You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by GitBox <gi...@apache.org> on 2021/11/13 01:08:04 UTC

[GitHub] [httpcomponents-client] schlosna commented on a change in pull request #325: HTTPCLIENT-2184: Fix classic client connection reuse

schlosna commented on a change in pull request #325:
URL: https://github.com/apache/httpcomponents-client/pull/325#discussion_r748562301



##########
File path: httpclient5/src/main/java/org/apache/hc/client5/http/impl/classic/ProtocolExec.java
##########
@@ -201,13 +201,15 @@ public ClassicHttpResponse execute(
 
                 if (Method.TRACE.isSame(request.getMethod())) {
                     // Do not perform authentication for TRACE request
+                    ResponseEntityProxy.enhance(response, execRuntime);

Review comment:
       Is there any code path in this method where we wouldn't want to enhance the `response` with the `execRuntime`? Github won't let me add the suggested change below as its outside the diff context, but should we consider pulling this & line 212 up to line 198 after creating `response` from the chain?
   
   ```
                   final ClassicHttpResponse response = chain.proceed(request, scope);
                   ResponseEntityProxy.enhance(response, execRuntime);
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org