{"action":"created","issue":{"url":"https://api.github.com/repos/shazow/urllib3/issues/775","labels_url":"https://api.github.com/repos/shazow/urllib3/issues/775/labels{/name}","comments_url":"https://api.github.com/repos/shazow/urllib3/issues/775/comments","events_url":"https://api.github.com/repos/shazow/urllib3/issues/775/events","html_url":"https://github.com/shazow/urllib3/pull/775","id":124646772,"number":775,"title":"WIP: Chunked transfer encoding on HTTP requests","user":{"login":"ml31415","id":2386612,"avatar_url":"https://avatars.githubusercontent.com/u/2386612?v=3","gravatar_id":"","url":"https://api.github.com/users/ml31415","html_url":"https://github.com/ml31415","followers_url":"https://api.github.com/users/ml31415/followers","following_url":"https://api.github.com/users/ml31415/following{/other_user}","gists_url":"https://api.github.com/users/ml31415/gists{/gist_id}","starred_url":"https://api.github.com/users/ml31415/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ml31415/subscriptions","organizations_url":"https://api.github.com/users/ml31415/orgs","repos_url":"https://api.github.com/users/ml31415/repos","events_url":"https://api.github.com/users/ml31415/events{/privacy}","received_events_url":"https://api.github.com/users/ml31415/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/shazow/urllib3/labels/Feedback%20Pending","name":"Feedback Pending","color":"d7e102"},{"url":"https://api.github.com/repos/shazow/urllib3/labels/Soon","name":"Soon","color":"d7e102"}],"state":"open","locked":false,"assignee":{"login":"Lukasa","id":1382556,"avatar_url":"https://avatars.githubusercontent.com/u/1382556?v=3","gravatar_id":"","url":"https://api.github.com/users/Lukasa","html_url":"https://github.com/Lukasa","followers_url":"https://api.github.com/users/Lukasa/followers","following_url":"https://api.github.com/users/Lukasa/following{/other_user}","gists_url":"https://api.github.com/users/Lukasa/gists{/gist_id}","starred_url":"https://api.github.com/users/Lukasa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Lukasa/subscriptions","organizations_url":"https://api.github.com/users/Lukasa/orgs","repos_url":"https://api.github.com/users/Lukasa/repos","events_url":"https://api.github.com/users/Lukasa/events{/privacy}","received_events_url":"https://api.github.com/users/Lukasa/received_events","type":"User","site_admin":false},"milestone":null,"comments":26,"created_at":"2016-01-03T12:40:55Z","updated_at":"2016-01-25T17:06:53Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/shazow/urllib3/pulls/775","html_url":"https://github.com/shazow/urllib3/pull/775","diff_url":"https://github.com/shazow/urllib3/pull/775.diff","patch_url":"https://github.com/shazow/urllib3/pull/775.patch"},"body":"I recently stumbled upon this quite hacky lines in requests: https://github.com/kennethreitz/requests/blob/master/requests/adapters.py#L380 What happens there is, that requests has to do dirty low level work, to get chunked transfer encoding going on in HTTP requests. This low level hack is fairly untested there (if I didn't miss anything obvious), and doesn't really integrate well with all the proxy stuff etc. going on on higher levels, especially error handling, as many higher levels of urllib3 are just bypassed. \r\n\r\nBut it looks like currently there was no better way to do this, as urllib3 does not support any chunked request by itself. The original `httplib.HTTPConnection` is also lacking this feature. So this pull request is basically adding some separate `request_chunked` method on HTTPConnection and exposes this functionality to upstream libraries, i.e. requests, so that it can make use of it in some later version and get rid of the misplaced lowlevel code.\r\n\r\nIn terms of implementation, it would have probably been more elgant to just add a `chunked` flag to the `HTTPConnection.request` method itself, but I thought it may be better for backwards compatibility, to have a separate function."},"comment":{"url":"https://api.github.com/repos/shazow/urllib3/issues/comments/174586972","html_url":"https://github.com/shazow/urllib3/pull/775#issuecomment-174586972","issue_url":"https://api.github.com/repos/shazow/urllib3/issues/775","id":174586972,"user":{"login":"ml31415","id":2386612,"avatar_url":"https://avatars.githubusercontent.com/u/2386612?v=3","gravatar_id":"","url":"https://api.github.com/users/ml31415","html_url":"https://github.com/ml31415","followers_url":"https://api.github.com/users/ml31415/followers","following_url":"https://api.github.com/users/ml31415/following{/other_user}","gists_url":"https://api.github.com/users/ml31415/gists{/gist_id}","starred_url":"https://api.github.com/users/ml31415/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ml31415/subscriptions","organizations_url":"https://api.github.com/users/ml31415/orgs","repos_url":"https://api.github.com/users/ml31415/repos","events_url":"https://api.github.com/users/ml31415/events{/privacy}","received_events_url":"https://api.github.com/users/ml31415/received_events","type":"User","site_admin":false},"created_at":"2016-01-25T17:06:53Z","updated_at":"2016-01-25T17:06:53Z","body":"Sounds great! Thanks for continuing this!"}}