-
-
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
Problem with trailer header #1876
Labels
Comments
could you write test case? |
Sure, in which format it should be? |
Doesn't matter, probably in test_client_protocol, I think it would be simplest |
I've found out that the problem was on my side while writing the test case. Your fix works as expected. Thanks! |
Closed
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Long story short
I described an issues in #1619 Later I update aiohttp for new version however the problem is still here.
Http response (body and trailers part):
"{ "doc": "some data"}\nX-Custom-Header1=0\r\nX-Custom-Header2=custom2\r\nX-Custom-Header3={}\r\n\r\n
Expected behaviour
aiohttp loads json body and skips trailers. Parsing of the next response should not read any trailers from previous response.
Actual behaviour
aiohttp loads json and do not read any trailer data from reader. Debugging shows that response reader buffer contains this trailer data.
When I use the same session the next response parsing will be started from the trailers. Therefore it leads to parsing exception.
Steps to reproduce
Your environment
macOS Sierra, aiohttp 2.0.7
The text was updated successfully, but these errors were encountered: