Rajadeepan commented on a change in pull request #648: [SCB-482] Http2 support 
for java-chassis
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/648#discussion_r183009523
 
 

 ##########
 File path: 
transports/transport-rest/transport-rest-client/src/main/java/org/apache/servicecomb/transport/rest/client/RestTransportClient.java
 ##########
 @@ -62,7 +77,16 @@ private static HttpClientOptions createHttpClientOptions() {
   }
 
   public void send(Invocation invocation, AsyncResponse asyncResp) throws 
Exception {
-    HttpClientWithContext httpClientWithContext = 
clientMgr.findClientPool(invocation.isSync());
+    URIEndpointObject endpoint = (URIEndpointObject) 
invocation.getEndpoint().getAddress();
+    HttpClientWithContext httpClientWithContext;
+    if (endpoint.isHttp2Enabled()) {
+      httpClientWithContext = 
clientMgrHttp2.findClientPool(invocation.isSync());
+      if (!endpoint.isSslEnabled()) {
+        ((HttpClientImpl) 
httpClientWithContext.getHttpClient()).getOptions().setHttp2ClearTextUpgrade(false);
 
 Review comment:
   http2 + ssl         = h2
   http2 + without ssl = h2c
   for the http2 client instance to work with h2c the http2ClearTextUpgrade 
need to be set to false
   
   
![image](https://user-images.githubusercontent.com/13465886/39046247-264d48f8-44b3-11e8-99d3-dafcd9bed953.png)
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to