Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitff85849

Browse files
committed
Expect body chunks when aborting during status handling,closeAsyncHttpClient#1430
Motivation:When aborting during response status handling, we currently directlyoffer the channel to the pool. This is wrong as we’ll at least receivethe LastHttpContent. Currently, this event is received by the nextrequest being executed with this channel, causing a null response.Modification:Always expect chunks when aborting during status or headers handling,causing channel to be drained before being offered to the pool.Note that AHC 2.1 doesn’t suffer from this issue as aborting now alwaysclose the channel.Result:No more null response when aborting on status or headers handling
1 parent70a2bb4 commitff85849

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

‎client/src/main/java/org/asynchttpclient/netty/handler/HttpHandler.java‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,9 @@ private void notifyHandler(Channel channel, NettyResponseFuture<?> future, HttpR
7777
exitAfterHandlingHeaders(channel,future,response,handler,responseHeaders,httpRequest) ||//
7878
exitAfterHandlingReactiveStreams(channel,future,response,handler,httpRequest);
7979

80-
if (exit)
81-
finishUpdate(future,channel,HttpHeaders.isTransferEncodingChunked(httpRequest) ||HttpHeaders.isTransferEncodingChunked(response));
80+
if (exit) {
81+
finishUpdate(future,channel,true);
82+
}
8283
}
8384

8485
privatebooleanexitAfterHandlingStatus(//

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp