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
HttpObjectDecoder throws TooLongFrameException when it should not #3445
Comments
I wrote an unit test that can reproduce this bug against HEAD.
Can someone please take a look? This is blocking us from adopting Netty 4 - which we are eagerly looking forward to because it looks all great otherwise. Thanks! |
trustin
added a commit
that referenced
this issue
Mar 3, 2015
Related: #3445 Motivation: HttpObjectDecoder.HeaderParser does not reset its counter (the size field) when it failed to find the end of line. If a header is split into multiple fragments, the counter is increased as many times as the number of fragments, resulting an unexpected TooLongFrameException. Modifications: - Add test cases that reproduces the problem - Reset the HeaderParser.size field when no EOL is found. Result: One less bug
trustin
added a commit
that referenced
this issue
Mar 4, 2015
Related: #3445 Motivation: HttpObjectDecoder.HeaderParser does not reset its counter (the size field) when it failed to find the end of line. If a header is split into multiple fragments, the counter is increased as many times as the number of fragments, resulting an unexpected TooLongFrameException. Modifications: - Add test cases that reproduces the problem - Reset the HeaderParser.size field when no EOL is found. Result: One less bug
trustin
added a commit
that referenced
this issue
Mar 4, 2015
Related: #3445 Motivation: HttpObjectDecoder.HeaderParser does not reset its counter (the size field) when it failed to find the end of line. If a header is split into multiple fragments, the counter is increased as many times as the number of fragments, resulting an unexpected TooLongFrameException. Modifications: - Add test cases that reproduces the problem - Reset the HeaderParser.size field when no EOL is found. Result: One less bug
trustin
added a commit
that referenced
this issue
Mar 4, 2015
Related: #3445 Motivation: HttpObjectDecoder.HeaderParser does not reset its counter (the size field) when it failed to find the end of line. If a header is split into multiple fragments, the counter is increased as many times as the number of fragments, resulting an unexpected TooLongFrameException. Modifications: - Add test cases that reproduces the problem - Reset the HeaderParser.size field when no EOL is found. Result: One less bug
trustin
added a commit
that referenced
this issue
Mar 4, 2015
Related: #3445 Motivation: HttpObjectDecoder.HeaderParser does not reset its counter (the size field) when it failed to find the end of line. If a header is split into multiple fragments, the counter is increased as many times as the number of fragments, resulting an unexpected TooLongFrameException. Modifications: - Add test cases that reproduces the problem - Reset the HeaderParser.size field when no EOL is found. Result: One less bug
pulllock
pushed a commit
to pulllock/netty
that referenced
this issue
Oct 19, 2023
Related: netty#3445 Motivation: HttpObjectDecoder.HeaderParser does not reset its counter (the size field) when it failed to find the end of line. If a header is split into multiple fragments, the counter is increased as many times as the number of fragments, resulting an unexpected TooLongFrameException. Modifications: - Add test cases that reproduces the problem - Reset the HeaderParser.size field when no EOL is found. Result: One less bug
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Netty version: 4.0.25.Final
It seems the
HttpObjectDecoder
does not behave correctly when receiving large HTTP header whose data is across multipleByteBuf
s. Specifically, the following method inHeaderParser
does not reset itssize
or update buffer'sreaderIndex
when it returnsnull
. So the next time it's called with an accumulated buffer that contains the previous one, thesize
of the previous buffer will be counted twice.Is this a bug or do I miss anything here?
The text was updated successfully, but these errors were encountered: