Upgrade apache http client version

apim420
tcdlpds 1 year ago
parent ac0ba00707
commit 52b2cccf9f

@ -189,8 +189,8 @@
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.httpcomponents</groupId> <groupId>org.apache.httpcomponents.client5</groupId>
<artifactId>httpclient</artifactId> <artifactId>httpclient5</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.entgra.device.mgt.core</groupId> <groupId>io.entgra.device.mgt.core</groupId>

@ -151,13 +151,10 @@
<groupId>commons-logging</groupId> <groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId> <artifactId>commons-logging</artifactId>
</dependency> </dependency>
<!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient -->
<dependency> <dependency>
<groupId>org.apache.httpcomponents</groupId> <groupId>org.apache.httpcomponents.client5</groupId>
<artifactId>httpclient</artifactId> <artifactId>httpclient5</artifactId>
</dependency> </dependency>
<!-- https://mvnrepository.com/artifact/com.googlecode.json-simple/json-simple -->
<!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpcore -->
<dependency> <dependency>
<groupId>org.apache.httpcomponents</groupId> <groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId> <artifactId>httpcore</artifactId>

@ -34,6 +34,9 @@ import org.apache.commons.fileupload.servlet.ServletFileUpload;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManagerBuilder;
import org.apache.hc.client5.http.ssl.SSLConnectionSocketFactoryBuilder;
import org.apache.hc.core5.ssl.SSLContextBuilder;
import org.apache.http.Consts; import org.apache.http.Consts;
import org.apache.http.Header; import org.apache.http.Header;
import org.apache.http.HttpHeaders; import org.apache.http.HttpHeaders;
@ -44,6 +47,7 @@ import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost; import org.apache.http.client.methods.HttpPost;
import org.apache.http.client.methods.HttpRequestBase; import org.apache.http.client.methods.HttpRequestBase;
import org.apache.http.conn.ssl.NoopHostnameVerifier; import org.apache.http.conn.ssl.NoopHostnameVerifier;
import org.apache.http.conn.ssl.X509HostnameVerifier;
import org.apache.http.cookie.SM; import org.apache.http.cookie.SM;
import org.apache.http.entity.BufferedHttpEntity; import org.apache.http.entity.BufferedHttpEntity;
import org.apache.http.entity.ContentType; import org.apache.http.entity.ContentType;
@ -359,7 +363,7 @@ public class HandlerUtil {
boolean isIgnoreHostnameVerification = Boolean.parseBoolean(System. boolean isIgnoreHostnameVerification = Boolean.parseBoolean(System.
getProperty("org.wso2.ignoreHostnameVerification")); getProperty("org.wso2.ignoreHostnameVerification"));
if (isIgnoreHostnameVerification) { if (isIgnoreHostnameVerification) {
return HttpClients.custom().setSSLHostnameVerifier(NoopHostnameVerifier.INSTANCE).build(); return HttpClients.custom().setHostnameVerifier((X509HostnameVerifier) NoopHostnameVerifier.INSTANCE).build();
} else { } else {
return HttpClients.createDefault(); return HttpClients.createDefault();
} }

@ -1310,8 +1310,8 @@
<version>${github.openfeign.version}</version> <version>${github.openfeign.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.httpcomponents</groupId> <groupId>org.apache.httpcomponents.client5</groupId>
<artifactId>httpclient</artifactId> <artifactId>httpclient5</artifactId>
<version>${apache.http.client.version}</version> <version>${apache.http.client.version}</version>
</dependency> </dependency>
<!-- Removing neethi configs from webapp--> <!-- Removing neethi configs from webapp-->
@ -2043,7 +2043,7 @@
<github.openfeign.version>11.0</github.openfeign.version> <github.openfeign.version>11.0</github.openfeign.version>
<jsr311.version>1.1.1</jsr311.version> <jsr311.version>1.1.1</jsr311.version>
<commons.logging.version>1.2</commons.logging.version> <commons.logging.version>1.2</commons.logging.version>
<apache.http.client.version>4.5.6</apache.http.client.version> <apache.http.client.version>5.2.1</apache.http.client.version>
<!-- apache http components core --> <!-- apache http components core -->
<apache.http.core.version>4.4.13</apache.http.core.version> <apache.http.core.version>4.4.13</apache.http.core.version>
<apache.http.mime.version>4.5.10</apache.http.mime.version> <apache.http.mime.version>4.5.10</apache.http.mime.version>

Loading…
Cancel
Save