{"action":"closed","issue":{"url":"https://api.github.com/repos/imazen/resizer/issues/234","repository_url":"https://api.github.com/repos/imazen/resizer","labels_url":"https://api.github.com/repos/imazen/resizer/issues/234/labels{/name}","comments_url":"https://api.github.com/repos/imazen/resizer/issues/234/comments","events_url":"https://api.github.com/repos/imazen/resizer/issues/234/events","html_url":"https://github.com/imazen/resizer/issues/234","id":337144107,"node_id":"MDU6SXNzdWUzMzcxNDQxMDc=","number":234,"title":"RemoteReaderPlugin behavior not the same in async and synch paths","user":{"login":"sixten","id":7528,"node_id":"MDQ6VXNlcjc1Mjg=","avatar_url":"https://avatars1.githubusercontent.com/u/7528?v=4","gravatar_id":"","url":"https://api.github.com/users/sixten","html_url":"https://github.com/sixten","followers_url":"https://api.github.com/users/sixten/followers","following_url":"https://api.github.com/users/sixten/following{/other_user}","gists_url":"https://api.github.com/users/sixten/gists{/gist_id}","starred_url":"https://api.github.com/users/sixten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sixten/subscriptions","organizations_url":"https://api.github.com/users/sixten/orgs","repos_url":"https://api.github.com/users/sixten/repos","events_url":"https://api.github.com/users/sixten/events{/privacy}","received_events_url":"https://api.github.com/users/sixten/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-06-29T21:34:34Z","updated_at":"2018-07-02T20:52:09Z","closed_at":"2018-07-02T20:52:09Z","author_association":"NONE","body":"It took me an embarrassingly long time to realize that the realize that the reason why requests coming from the `RemoteReaderPlugin` didn't have a User-Agent header, despite the [revision history clearly showing](https://github.com/imazen/resizer/commit/08b67fae003f53b9ed48662725e955753a93e242#diff-5afd98783ec8e34bf16cbead1c150f53) that added months ago, was that there are two code paths—`GetUriStream()` and `GetUriStreamAsync()`—only one of which was adding this header (and we were on the other one).\r\n\r\nLooking at the two methods side by side, they also appear to handle redirects very differently: the async version sets `AllowAutoRedirect` and `MaximumAutomaticRedirections`, while the synchronous version inspects the response and calls itself recursively to handle redirects.\r\n\r\nAre either of these differences intentional? Would you accept a pull request that factors out the request construction and response handling code so it's the same? If so, which version of the redirect handling is the one you'd like to keep?\r\n\r\n(Under more of an enhancement heading, is there a strong reason to stay with `HttpWebRequest` over `HttpClient`?)"}}
{"actor":{"display_login":"nathanaeljones"}}