jdyer1 commented on code in PR #2259:
URL: https://github.com/apache/solr/pull/2259#discussion_r1520321105


##########
solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpSolrJdkClient.java:
##########
@@ -287,6 +278,64 @@ private HttpResponse<InputStream> doPutOrPost(
     return response;
   }
 
+  private volatile boolean headRequested;
+  private volatile boolean headSucceeded;

Review Comment:
   I left this as it is and it only will complete a HEAD request the very first 
time a POST request with a chunked body is executed.  If the HEAD request 
succeeds it lets the jdk client send upgrade requests from then on.  If it 
fails, it forces http/1.1 for all POST requests with a chunked body.  I did add 
an INFO logging message so users might get a clue of what is going on in these 
instances.
   
   None of this applies if the request uses TLS.  For secure requests, Jetty 
and the JDK are in agreement on the correct way to negotiate the protocol so 
all of this is unnecessary.  Of course, if the user requests to always 
downgrade to http/1.1 this log is skipped as well.



-- 
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: issues-unsubscr...@solr.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to