Skip to content

Commit 7dadbe8

Browse files
committed
bump up httpclient version
1 parent 2a30333 commit 7dadbe8

File tree

4 files changed

+18
-1
lines changed

4 files changed

+18
-1
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"category": "Apache Http Client",
3+
"type": "bugfix",
4+
"description": "Disable apache normalization to handle breaking change introduced in apache httpclient `4.5.7`. See [aws/aws-sdk-java[#1919](https://github.com/aws/aws-sdk-java-v2/issues/1919)](https://github.com/aws/aws-sdk-java/issues/1919) for more information."
5+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"category": "AWS SDK for Java v2",
3+
"type": "feature",
4+
"description": "Update Apache http client version to `4.5.9`."
5+
}

http-clients/apache-client/src/main/java/software/amazon/awssdk/http/apache/internal/utils/ApacheUtils.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,11 @@
3232
import org.apache.http.impl.client.BasicCredentialsProvider;
3333
import software.amazon.awssdk.annotations.SdkInternalApi;
3434
import software.amazon.awssdk.http.apache.ProxyConfiguration;
35+
import software.amazon.awssdk.utils.Logger;
3536

3637
@SdkInternalApi
3738
public final class ApacheUtils {
39+
private static final Logger logger = Logger.loggerFor(ApacheUtils.class);
3840

3941
private ApacheUtils() {
4042
}
@@ -87,6 +89,11 @@ public static void disableNormalizeUri(RequestConfig.Builder requestConfigBuilde
8789
requestConfigBuilder.setNormalizeUri(false);
8890
} catch (NoSuchMethodError error) {
8991
// setNormalizeUri method was added in httpclient 4.5.8
92+
logger.warn(() -> "NoSuchMethodError was thrown when disabling normalizeUri. This indicates you are using an old "
93+
+ "version (< 4.5.8) of Apache http "
94+
+ "client. It is recommended to use http client version >= 4.5.9 to avoid the breaking change "
95+
+ "introduced in apache client 4.5.7 and the latency in exception handling. "
96+
+ "See https://github.com/aws/aws-sdk-java/issues/1919 for more information");
9097
}
9198
}
9299

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@
145145
<aspectj.version>1.8.2</aspectj.version>
146146

147147
<jre.version>1.8</jre.version>
148-
<httpcomponents.httpclient.version>4.5.8</httpcomponents.httpclient.version>
148+
<httpcomponents.httpclient.version>4.5.9</httpcomponents.httpclient.version>
149149
<httpcomponents.httpcore.version>4.4.10</httpcomponents.httpcore.version>
150150

151151
<!-- These properties are used by cucumber tests related code -->

0 commit comments

Comments
 (0)