-
-
Notifications
You must be signed in to change notification settings - Fork 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
aiohttp.Client can't parse Trailer headers and throws exception #1619
Comments
seems example from https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Trailer page it should be like this
|
Yes, you're right. I used it just to illustrate headers and trailers order |
ok, should be easy to fix |
so new parser should strip trailers properly. but should we provide some api to access trailers data? |
fixed in master |
how to access |
In my case I don't need these headers, however, it'd a nice feature to have (access to trailer) |
Hi, can you say when do you plan to release a new version with this fix? |
I am planing to release 2.0dev next Tuesday. |
Hi, I've just updated to version 2.0.5 |
Could you create test case |
Actually the fix works as expected. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a [new issue] for related bugs. |
Long story short
I work with some storage service via http. It sends me chunked response and several trailing headers after the body. All of this trailers are specified in a Trailer header according to https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Trailer
First problem: the client completely ignores this headers and doesn't parse them. Such behaviour violates HTTP 1.1
However, there is a bigger problem. If you use a single session the parsers would start the next parsing from the previous (!) response - beginning from these trailing headers. So the parser thinks it's the first line of new response and throws exception because it didn't find HTTP verb in it.
Therefore I can't reuse session in my app which leads to performance problems :(
Expected behaviour
Actual behaviour
Steps to reproduce
Checked on macOs 10.12.3 and Ubuntu Trusty 14.04
The text was updated successfully, but these errors were encountered: