Skip to content

Commit

Permalink
SLVSCODE-210 Force HTTP 1 to solve protocol version issues behind som…
Browse files Browse the repository at this point in the history
…e proxies
  • Loading branch information
jblievremont committed Oct 25, 2021
1 parent c4a70ea commit 9280dab
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
import org.apache.hc.core5.concurrent.FutureCallback;
import org.apache.hc.core5.http.ContentType;
import org.apache.hc.core5.http.HttpHeaders;
import org.apache.hc.core5.http2.HttpVersionPolicy;
import org.apache.hc.core5.util.Timeout;
import org.sonar.api.utils.log.Logger;
import org.sonar.api.utils.log.Loggers;
Expand Down Expand Up @@ -161,6 +162,7 @@ public static ApacheHttpClient create() {
.setConnectionRequestTimeout(CONNECTION_TIMEOUT)
.setResponseTimeout(RESPONSE_TIMEOUT)
.build())
.setVersionPolicy(HttpVersionPolicy.FORCE_HTTP_1)
.build();
httpClient.start();
return new ApacheHttpClient(httpClient, null);
Expand Down

0 comments on commit 9280dab

Please sign in to comment.