Skip to content

Commit

Permalink
Fix a bug for 100-continue (linkedin#2902)
Browse files Browse the repository at this point in the history
Co-authored-by: Sophie Guo <[email protected]>
  • Loading branch information
SophieGuo410 and Sophie Guo authored Sep 26, 2024
1 parent c39ab49 commit 4b88e9d
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -376,11 +376,13 @@ private boolean handleContent(HttpContent httpContent) throws RestServiceExcepti
nettyMetrics.requestChunkProcessingTimeInMs.update(chunkProcessingTime);
request.getMetricsTracker().nioMetricsTracker.addToRequestProcessingTime(chunkProcessingTime);
}
boolean isPutOrPost = request.getRestMethod().equals(RestMethod.POST) || request.getRestMethod().equals(RestMethod.PUT);
boolean isPutOrPost =
request.getRestMethod().equals(RestMethod.POST) || request.getRestMethod().equals(RestMethod.PUT);
boolean isMultipart = request.isMultipart() && requestContentFullyReceived;
boolean hasContinueAndIsPutOrPost = RestUtils.isPutOrPostS3RequestAndExpectContinue(request);
boolean hasContinueAndIsPutOrPost =
nettyConfig.nettyEnableOneHundredContinue && RestUtils.isPutOrPostS3RequestAndExpectContinue(request);
if (success && (!isPutOrPost || isMultipart || hasContinueAndIsPutOrPost)) {
if (nettyConfig.nettyEnableOneHundredContinue && hasContinueAndIsPutOrPost) {
if (hasContinueAndIsPutOrPost) {
request.setArg(EXPECT, "");
removeInternalKeyFromRequest();
responseChannel = new NettyResponseChannel(ctx, nettyMetrics, performanceConfig, nettyConfig);
Expand Down

0 comments on commit 4b88e9d

Please sign in to comment.