ok2c commented on code in PR #751:
URL: 
https://github.com/apache/httpcomponents-core/pull/751#discussion_r4640954146


##########
httpcore5/src/main/java/org/apache/hc/core5/http/impl/DefaultConnectionReuseStrategy.java:
##########
@@ -85,6 +85,12 @@ public boolean keepAlive(
             if (request.containsHeader(HttpHeaders.CONTENT_LENGTH) && 
request.containsHeader(HttpHeaders.TRANSFER_ENCODING)) {
                 return false;
             }
+            // Consider framing of a HTTP/1.0 request message with 
Transfer-Encoding header faulty
+            final ProtocolVersion requestVersion = request.getVersion();
+            if (requestVersion != null && 
requestVersion.lessEquals(HttpVersion.HTTP_1_0)
+                    && request.containsHeader(HttpHeaders.TRANSFER_ENCODING)) {

Review Comment:
   @rootvector2 Let's avoid repeating the same check.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to