aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-server-common
diff options
context:
space:
mode:
authorAurelien Poscia <aurelien.poscia@sonarsource.com>2022-03-21 11:48:45 +0100
committersonartech <sonartech@sonarsource.com>2022-03-28 20:02:53 +0000
commite5afa24f74e5486d6b9839bb818415f0326c20c6 (patch)
treede294d9c9c1ffc65d40ad7ce2a2a8259ced541f9 /server/sonar-server-common
parent6f4f63956ee19a7b6f334e6f36aea7f52bb4d2eb (diff)
downloadsonarqube-e5afa24f74e5486d6b9839bb818415f0326c20c6.tar.gz
sonarqube-e5afa24f74e5486d6b9839bb818415f0326c20c6.zip
SONAR-16152 SONAR-16153 use user provided read/connect timeout for bitbucket cloud http client and stop following redirections
Diffstat (limited to 'server/sonar-server-common')
-rw-r--r--server/sonar-server-common/src/main/java/org/sonar/server/util/OkHttpClientProvider.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/server/sonar-server-common/src/main/java/org/sonar/server/util/OkHttpClientProvider.java b/server/sonar-server-common/src/main/java/org/sonar/server/util/OkHttpClientProvider.java
index 8c1a88e9484..3a50f78a28e 100644
--- a/server/sonar-server-common/src/main/java/org/sonar/server/util/OkHttpClientProvider.java
+++ b/server/sonar-server-common/src/main/java/org/sonar/server/util/OkHttpClientProvider.java
@@ -26,6 +26,7 @@ import org.sonar.api.config.Configuration;
import org.sonar.api.server.ServerSide;
import org.sonarqube.ws.client.OkHttpClientBuilder;
import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Primary;
import static java.lang.String.format;
import static org.sonar.process.ProcessProperties.Property.HTTP_PROXY_PASSWORD;
@@ -51,6 +52,7 @@ public class OkHttpClientProvider {
/**
* @return a {@link OkHttpClient} singleton
*/
+ @Primary
@Bean("OkHttpClient")
public OkHttpClient provide(Configuration config, SonarRuntime runtime) {
OkHttpClientBuilder builder = new OkHttpClientBuilder();