You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicecomb.apache.org by GitBox <gi...@apache.org> on 2018/05/07 14:11:36 UTC

[GitHub] Rajadeepan commented on a change in pull request #648: [SCB-482] Http2 support for java-chassis

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_r186434879
 
 

 ##########
 File path: transports/transport-rest/transport-rest-client/src/main/java/org/apache/servicecomb/transport/rest/client/RestTransportClient.java
 ##########
 @@ -73,8 +89,21 @@ private static HttpClientOptions createHttpClientOptions() {
   }
 
   public void send(Invocation invocation, AsyncResponse asyncResp) {
-    HttpClientWithContext httpClientWithContext = findHttpClientPool(invocation);
+    URIEndpointObject endpoint = (URIEndpointObject) invocation.getEndpoint().getAddress();
+    HttpClientWithContext httpClientWithContext;
+
+    if (endpoint.isHttp2Enabled()) {
+      httpClientWithContext = findHttp2ClientPool(invocation);
+
+      if (!endpoint.isSslEnabled()) {
+        ((HttpClientImpl) httpClientWithContext.getHttpClient()).getOptions().setHttp2ClearTextUpgrade(false);
 
 Review comment:
   Fixed and committed

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services