-
-
Notifications
You must be signed in to change notification settings - Fork 856
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
RemoteProtocolError: multiple Transfer-Encoding headers #1862
Comments
Thanks @cancan101 - looks like a case of |
Multiple To ease this restriction you can monkey-patch def _patch(headers, _parsed=False):
...
import httpx
# monkey-patch AsyncClient
httpx._transports.default.httpcore._async.http11.h11._headers.normalize_and_validate = _patch
# monkey-patch Client? (not tested)
httpx._transports.default.httpcore._sync.http11.h11._headers.normalize_and_validate = _patch Here's mine. It only accepts multiple
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Boop |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
any update on a fix? |
@logan-vitelity This is actually an At the moment the only solution is the monkeypatching. |
Just a suggestion for someone who face the same problem:
|
RFC 7230 is superceded by RFC 9112. I read RFC 9112 looking for the "explicitly forbidden" spec... I cannot find it. But I know that RFCs can often be vague to the point of having multiple mutually exclusive yet reasonable interpretations. Can someone clarify where the "explicitly forbidden" language is located in the RFC? |
@danstoner Okay, I've taken another look over the Given that It would be a reasonable change for it to also gracefully ignore multiple Would you consider a pull request on I'll also link to python-hyper/h11#175 so that if anyone is minded to start on a release we can hopefully get this resolved. |
Running:
produces
RemoteProtocolError: multiple Transfer-Encoding headers
.Using
requests
, works fine:The text was updated successfully, but these errors were encountered: