-
Notifications
You must be signed in to change notification settings - Fork 629
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
Add root cause exception when throwing PrematureCloseException
#2937
Conversation
@violetagg , can you take a look ? I don't think the failures from macos-native and windows-2029 are related. PS: I have set the label to enhancement because this is not a BUG fix per se, but I however have targeted the PR to 1.0.x because I think this simple improvement is worth it. thanks. |
reactor-netty-http/src/main/java/reactor/netty/http/client/HttpClientOperations.java
Outdated
Show resolved
Hide resolved
reactor-netty-http/src/main/java/reactor/netty/http/client/HttpClientOperations.java
Outdated
Show resolved
Hide resolved
reactor-netty-http/src/main/java/reactor/netty/http/client/HttpClientOperations.java
Show resolved
Hide resolved
…f addOutboundErrorCause method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
@violetagg , thanks for your review. |
The Merge done in the The problem in netty5 is that when the HeaderListSizeException is thrown, then:
|
PrematureCloseException
Reactor Netty’s HttpClient relies on Netty’s Http2FrameCodecBuilder. This codec, by default, enforces the MAX_HEADER_LIST_SIZE found in the SETTINGS sent by the server, meaning that If a request’s header list size exceeds the SETTINGS MAX_HEADER_LIST_SIZE limit, then HpackEncoder throws a HeaderListSizeException. Consequently, the request is not sent, and the client receives a PrematureCloseException error without any details.
Let's just add more specific root cause to the PrematureCloseException in order to make it meaningful in the case the request header size exceeds MAX_HEADER_LIST_SIZE (or if whatever Netty Http2 Codec exceptions are caught while writing the request out).
Example:
Fixes #2927