-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[v2] Use httplib's chunked encoding support? #2291
Comments
Kind-of related to this, I was wondering if we should instead add a |
The above change would also bring us closer to the stdlib's implementation but keep things urllib3-flavored, we're already married to the |
IMO this is a good idea. Several places in the code do Regarding using httplib, I took a closer look at the differences between urllib3's current First there are differences with how the headers are handled and how whether to do chunking is decided:
Next, differences in how the body argument is handled:
I'll leave the actual analysis of this to another day. |
urllib3.HTTPConnection
has a methodrequest_chunked
which sends the body with chunked encoding. Since Python 3.6, httplib supports this directly, with very similar-looking code. Since v2 now requires Python 3.6, I was wondering if we might want to use this.I haven't checked if there are any gotchas there, this is more of a placeholder issue since I couldn't find an existing issue discussing this.
The text was updated successfully, but these errors were encountered: