Skip to content

Commit 0be496a

Browse files
committed
Handled comments
1 parent 3428c92 commit 0be496a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

http-clients/apache5-client/src/main/java/software/amazon/awssdk/http/apache5/Apache5HttpClient.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,6 @@ private ConnectionManagerAwareHttpClient createClient(Apache5HttpClient.DefaultB
148148
ApacheConnectionManagerFactory cmFactory = new ApacheConnectionManagerFactory();
149149

150150
HttpClientBuilder builder = HttpClients.custom();
151-
//This is done to keep backward compatibility with Apache 4.x
152-
builder.disableRedirectHandling();
153151

154152
// Note that it is important we register the original connection manager with the
155153
// IdleConnectionReaper as it's required for the successful deregistration of managers
@@ -166,7 +164,9 @@ private ConnectionManagerAwareHttpClient createClient(Apache5HttpClient.DefaultB
166164
.disableContentCompression()
167165
.setKeepAliveStrategy(buildKeepAliveStrategy(standardOptions))
168166
.setUserAgent("") // SDK will set the user agent header in the pipeline. Don't let Apache waste time
169-
.setConnectionManager(ClientConnectionManagerFactory.wrap(cm));
167+
.setConnectionManager(ClientConnectionManagerFactory.wrap(cm))
168+
//This is done to keep backward compatibility with Apache 4.x
169+
.disableRedirectHandling();
170170

171171
addProxyConfig(builder, configuration);
172172

0 commit comments

Comments
 (0)