-
Notifications
You must be signed in to change notification settings - Fork 62
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
Handle multiple Content-Length headers with the same value #92
Comments
This is one of those places where we definitely should do that if it's necessary for real world interoperability, but I'm reluctant to jump through hoops for it unless it is necessary for real world interoperability. Do you know of cases where folks are relying on duplicate identical content-lengths being accepted? Are you filing this because you ran into a case where the current behaviour broke something...? |
User reported this issue on the HTTPX issue tracker: encode/httpx#740 |
Yep, I see it:
Also, some websearching suggests that Chrome actually shipped some versions that errored out on pages like that (see e.g. https://varnish-cache.org/lists/pipermail/varnish-bugs/2010-October/003222.html), but Chrome no longer errors out on that site, so they must have explicitly decided to revert that change for better interoperability. So, ugh, fine, I guess we should support it too. I guess supporting it for our own content-length tracking is straightforward enough. Some questions:
|
I'm thinking the following for those questions:
and
into and still error on |
From RFC 7230 Section 3.3.2:
Currently h11 will error out if multiple
Content-Length
headers are sent even when equal in value. Perhaps we should collapse the multiple headers into only one or allow the duplicate to pass through if the values are the same?The text was updated successfully, but these errors were encountered: