-
Notifications
You must be signed in to change notification settings - Fork 657
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add root cause exception when throwing PrematureCloseException (#2937)
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: reactor.netty.http.client.PrematureCloseException: Connection prematurely closed BEFORE response Caused by: io.netty.handler.codec.http2.Http2Exception$HeaderListSizeException: Header size exceeded max allowed size (1024) Fixes #2927
- Loading branch information
Showing
3 changed files
with
82 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters