{"action":"created","issue":{"url":"https://api.github.com/repos/jcgregorio/httplib2/issues/320","labels_url":"https://api.github.com/repos/jcgregorio/httplib2/issues/320/labels{/name}","comments_url":"https://api.github.com/repos/jcgregorio/httplib2/issues/320/comments","events_url":"https://api.github.com/repos/jcgregorio/httplib2/issues/320/events","html_url":"https://github.com/jcgregorio/httplib2/pull/320","id":117864516,"number":320,"title":"Reading the actual request may trigger CONNRESET on a cached connection","user":{"login":"smurfix","id":236571,"avatar_url":"https://avatars.githubusercontent.com/u/236571?v=3","gravatar_id":"","url":"https://api.github.com/users/smurfix","html_url":"https://github.com/smurfix","followers_url":"https://api.github.com/users/smurfix/followers","following_url":"https://api.github.com/users/smurfix/following{/other_user}","gists_url":"https://api.github.com/users/smurfix/gists{/gist_id}","starred_url":"https://api.github.com/users/smurfix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smurfix/subscriptions","organizations_url":"https://api.github.com/users/smurfix/orgs","repos_url":"https://api.github.com/users/smurfix/repos","events_url":"https://api.github.com/users/smurfix/events{/privacy}","received_events_url":"https://api.github.com/users/smurfix/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-11-19T17:29:52Z","updated_at":"2015-12-19T11:51:58Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/jcgregorio/httplib2/pulls/320","html_url":"https://github.com/jcgregorio/httplib2/pull/320","diff_url":"https://github.com/jcgregorio/httplib2/pull/320.diff","patch_url":"https://github.com/jcgregorio/httplib2/pull/320.patch"},"body":"This moves the block that reads the data up into the try: block.\r\n\r\nI hit this issue while testing aioamqp with pyrabbit. The sequence of events is:\r\n\r\n* send request without auth header\r\n* get an error\r\n* … meanwhile, the server starts thinking about what you just did\r\n  (like doing a DNS lookup for its error log)\r\n* re-send the request with auth header\r\n* … the server gets around to deciding that it wants to close your connection, and does so\r\n* get an ECONNRESET error reading the reply. :-(\r\n\r\nThis can also happen when you're re-using a cached connection after some time and hit the server's decision that it has waited long enough and will now close the connection.\r\n\r\nThus, please apply."},"comment":{"url":"https://api.github.com/repos/jcgregorio/httplib2/issues/comments/165978746","html_url":"https://github.com/jcgregorio/httplib2/pull/320#issuecomment-165978746","issue_url":"https://api.github.com/repos/jcgregorio/httplib2/issues/320","id":165978746,"user":{"login":"smurfix","id":236571,"avatar_url":"https://avatars.githubusercontent.com/u/236571?v=3","gravatar_id":"","url":"https://api.github.com/users/smurfix","html_url":"https://github.com/smurfix","followers_url":"https://api.github.com/users/smurfix/followers","following_url":"https://api.github.com/users/smurfix/following{/other_user}","gists_url":"https://api.github.com/users/smurfix/gists{/gist_id}","starred_url":"https://api.github.com/users/smurfix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smurfix/subscriptions","organizations_url":"https://api.github.com/users/smurfix/orgs","repos_url":"https://api.github.com/users/smurfix/repos","events_url":"https://api.github.com/users/smurfix/events{/privacy}","received_events_url":"https://api.github.com/users/smurfix/received_events","type":"User","site_admin":false},"created_at":"2015-12-19T11:51:58Z","updated_at":"2015-12-19T11:51:58Z","body":"Any progress? this change is necessary on py3.5."}}