{"action":"created","issue":{"url":"https://api.github.com/repos/kennethreitz/requests/issues/2422","labels_url":"https://api.github.com/repos/kennethreitz/requests/issues/2422/labels{/name}","comments_url":"https://api.github.com/repos/kennethreitz/requests/issues/2422/comments","events_url":"https://api.github.com/repos/kennethreitz/requests/issues/2422/events","html_url":"https://github.com/kennethreitz/requests/issues/2422","id":55284235,"number":2422,"title":"Broken pipe Exception","user":{"login":"cloverstd","id":1229983,"avatar_url":"https://avatars.githubusercontent.com/u/1229983?v=3","gravatar_id":"","url":"https://api.github.com/users/cloverstd","html_url":"https://github.com/cloverstd","followers_url":"https://api.github.com/users/cloverstd/followers","following_url":"https://api.github.com/users/cloverstd/following{/other_user}","gists_url":"https://api.github.com/users/cloverstd/gists{/gist_id}","starred_url":"https://api.github.com/users/cloverstd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloverstd/subscriptions","organizations_url":"https://api.github.com/users/cloverstd/orgs","repos_url":"https://api.github.com/users/cloverstd/repos","events_url":"https://api.github.com/users/cloverstd/events{/privacy}","received_events_url":"https://api.github.com/users/cloverstd/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/kennethreitz/requests/labels/Needs%20Info","name":"Needs Info","color":"e11d21"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":42,"created_at":"2015-01-23T14:03:14Z","updated_at":"2015-07-21T13:59:06Z","closed_at":"2015-04-11T02:58:50Z","body":"I post a large file to server, and it raise `ConnectionError` exception.\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"/Users/cloverstd/.virtualenvs/enterprise/lib/python2.7/site-packages/rq/worker.py\", line 479, in perform_job\r\n    rv = job.perform()\r\n  File \"/Users/cloverstd/.virtualenvs/enterprise/lib/python2.7/site-packages/rq/job.py\", line 466, in perform\r\n    self._result = self.func(*self.args, **self.kwargs)\r\n  File \"./jobs/office.py\", line 97, in notice_file\r\n    open('test.pdf', 'rb')))\r\n  File \"/Users/cloverstd/Dropbox/WorkSpace/gench/enterprise/wechatpy/enterprise/client/api/media.py\", line 15, in upload\r\n    'media': media_file\r\n  File \"/Users/cloverstd/Dropbox/WorkSpace/gench/enterprise/wechatpy/client/api/base.py\", line 20, in _post\r\n    return self._client._post(url, **kwargs)\r\n  File \"/Users/cloverstd/Dropbox/WorkSpace/gench/enterprise/wechatpy/client/base.py\", line 74, in _post\r\n    **kwargs\r\n  File \"/Users/cloverstd/Dropbox/WorkSpace/gench/enterprise/wechatpy/client/base.py\", line 39, in _request\r\n    **kwargs\r\n  File \"/Users/cloverstd/.virtualenvs/enterprise/lib/python2.7/site-packages/requests/api.py\", line 49, in request\r\n    response = session.request(method=method, url=url, **kwargs)\r\n  File \"/Users/cloverstd/.virtualenvs/enterprise/lib/python2.7/site-packages/requests/sessions.py\", line 461, in request\r\n    resp = self.send(prep, **send_kwargs)\r\n  File \"/Users/cloverstd/.virtualenvs/enterprise/lib/python2.7/site-packages/requests/sessions.py\", line 573, in send\r\n    r = adapter.send(request, **kwargs)\r\n  File \"/Users/cloverstd/.virtualenvs/enterprise/lib/python2.7/site-packages/requests/adapters.py\", line 415, in send\r\n    raise ConnectionError(err, request=request)\r\nConnectionError: ('Connection aborted.', error(32, 'Broken pipe'))\r\n```\r\n\r\nThe `test.pdf` is 4.2M, when I post it as a file, I get ConnectionError Exception.\r\nBut I use curl to post it to server, it can be uploaded successful.\r\n"},"comment":{"url":"https://api.github.com/repos/kennethreitz/requests/issues/comments/123316395","html_url":"https://github.com/kennethreitz/requests/issues/2422#issuecomment-123316395","issue_url":"https://api.github.com/repos/kennethreitz/requests/issues/2422","id":123316395,"user":{"login":"sirlark","id":1201564,"avatar_url":"https://avatars.githubusercontent.com/u/1201564?v=3","gravatar_id":"","url":"https://api.github.com/users/sirlark","html_url":"https://github.com/sirlark","followers_url":"https://api.github.com/users/sirlark/followers","following_url":"https://api.github.com/users/sirlark/following{/other_user}","gists_url":"https://api.github.com/users/sirlark/gists{/gist_id}","starred_url":"https://api.github.com/users/sirlark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sirlark/subscriptions","organizations_url":"https://api.github.com/users/sirlark/orgs","repos_url":"https://api.github.com/users/sirlark/repos","events_url":"https://api.github.com/users/sirlark/events{/privacy}","received_events_url":"https://api.github.com/users/sirlark/received_events","type":"User","site_admin":false},"created_at":"2015-07-21T13:59:06Z","updated_at":"2015-07-21T13:59:06Z","body":"Oh right, yup it works,\r\n\r\n    >>> new_R = conn.getresponse()\r\n    >>> new_R.status\r\n    405\r\n"}}