5050import software .amazon .awssdk .http .SdkHttpClient ;
5151import software .amazon .awssdk .http .SdkHttpMethod ;
5252import software .amazon .awssdk .http .SdkHttpRequest ;
53- import software .amazon .awssdk .http .apache . ApacheHttpClient ;
53+ import software .amazon .awssdk .http .apache5 . Apache5HttpClient ;
5454import software .amazon .awssdk .services .cloudfront .cookie .CookiesForCannedPolicy ;
5555import software .amazon .awssdk .services .cloudfront .cookie .CookiesForCustomPolicy ;
5656import software .amazon .awssdk .services .cloudfront .internal .utils .SigningUtils ;
@@ -142,7 +142,7 @@ static Stream<KeyTestCase> keyCases() throws Exception {
142142
143143 @ Test
144144 void unsignedUrl_shouldReturn403Response () throws Exception {
145- SdkHttpClient client = ApacheHttpClient .create ();
145+ SdkHttpClient client = Apache5HttpClient .create ();
146146 HttpExecuteResponse response =
147147 client .prepareRequest (HttpExecuteRequest .builder ()
148148 .request (SdkHttpRequest .builder ()
@@ -167,7 +167,7 @@ void getSignedUrlWithCannedPolicy_producesValidUrl(KeyTestCase testCase) throws
167167 .keyPairId (testCase .keyPairId )
168168 .expirationDate (expirationDate ).build ();
169169 SignedUrl signedUrl = cloudFrontUtilities .getSignedUrlWithCannedPolicy (request );
170- SdkHttpClient client = ApacheHttpClient .create ();
170+ SdkHttpClient client = Apache5HttpClient .create ();
171171 HttpExecuteResponse response = client .prepareRequest (HttpExecuteRequest .builder ()
172172 .request (signedUrl .createHttpGetRequest ())
173173 .build ()).call ();
@@ -186,7 +186,7 @@ void getSignedUrlWithCannedPolicy_withExpiredDate_shouldReturn403Response(KeyTes
186186 .privateKey (testCase .privateKey )
187187 .keyPairId (testCase .keyPairId )
188188 .expirationDate (expirationDate ));
189- SdkHttpClient client = ApacheHttpClient .create ();
189+ SdkHttpClient client = Apache5HttpClient .create ();
190190 HttpExecuteResponse response = client .prepareRequest (HttpExecuteRequest .builder ()
191191 .request (signedUrl .createHttpGetRequest ())
192192 .build ()).call ();
@@ -207,7 +207,7 @@ void getSignedUrlWithCustomPolicy_producesValidUrl(KeyTestCase testCase) throws
207207 .expirationDate (expirationDate )
208208 .activeDate (activeDate ).build ();
209209 SignedUrl signedUrl = cloudFrontUtilities .getSignedUrlWithCustomPolicy (request );
210- SdkHttpClient client = ApacheHttpClient .create ();
210+ SdkHttpClient client = Apache5HttpClient .create ();
211211 HttpExecuteResponse response = client .prepareRequest (HttpExecuteRequest .builder ()
212212 .request (signedUrl .createHttpGetRequest ())
213213 .build ()).call ();
@@ -227,7 +227,7 @@ void getSignedUrlWithCustomPolicy_withFutureActiveDate_shouldReturn403Response()
227227 .keyPairId (rsaKeyPairId )
228228 .expirationDate (expirationDate )
229229 .activeDate (activeDate ));
230- SdkHttpClient client = ApacheHttpClient .create ();
230+ SdkHttpClient client = Apache5HttpClient .create ();
231231 HttpExecuteResponse response = client .prepareRequest (HttpExecuteRequest .builder ()
232232 .request (signedUrl .createHttpGetRequest ())
233233 .build ()).call ();
@@ -245,7 +245,7 @@ void getCookiesForCannedPolicy_producesValidCookies(KeyTestCase testCase) throws
245245 .keyPairId (testCase .keyPairId )
246246 .expirationDate (expirationDate ));
247247
248- SdkHttpClient client = ApacheHttpClient .create ();
248+ SdkHttpClient client = Apache5HttpClient .create ();
249249 HttpExecuteResponse response = client .prepareRequest (HttpExecuteRequest .builder ()
250250 .request (cookies .createHttpGetRequest ())
251251 .build ()).call ();
@@ -266,7 +266,7 @@ void getCookiesForCannedPolicy_withExpiredDate_shouldReturn403Response() throws
266266 .expirationDate (expirationDate ).build ();
267267 CookiesForCannedPolicy cookies = cloudFrontUtilities .getCookiesForCannedPolicy (request );
268268
269- SdkHttpClient client = ApacheHttpClient .create ();
269+ SdkHttpClient client = Apache5HttpClient .create ();
270270 HttpExecuteResponse response = client .prepareRequest (HttpExecuteRequest .builder ()
271271 .request (cookies .createHttpGetRequest ())
272272 .build ()).call ();
@@ -286,7 +286,7 @@ void getCookiesForCustomPolicy_producesValidCookies(KeyTestCase testCase) throws
286286 .expirationDate (expirationDate )
287287 .activeDate (activeDate ));
288288
289- SdkHttpClient client = ApacheHttpClient .create ();
289+ SdkHttpClient client = Apache5HttpClient .create ();
290290 HttpExecuteResponse response = client .prepareRequest (HttpExecuteRequest .builder ()
291291 .request (cookies .createHttpGetRequest ())
292292 .build ()).call ();
@@ -309,7 +309,7 @@ void getCookiesForCustomPolicy_withFutureActiveDate_shouldReturn403Response() th
309309 .activeDate (activeDate ).build ();
310310 CookiesForCustomPolicy cookies = cloudFrontUtilities .getCookiesForCustomPolicy (request );
311311
312- SdkHttpClient client = ApacheHttpClient .create ();
312+ SdkHttpClient client = Apache5HttpClient .create ();
313313 HttpExecuteResponse response = client .prepareRequest (HttpExecuteRequest .builder ()
314314 .request (cookies .createHttpGetRequest ())
315315 .build ()).call ();
@@ -445,7 +445,7 @@ void getSignedUrlWithCustomPolicy_shouldAllowQueryParametersWhenUsingWildcard(Ke
445445 URI modifiedUri = URI .create (urlWithDynamicParam );
446446
447447
448- SdkHttpClient client = ApacheHttpClient .create ();
448+ SdkHttpClient client = Apache5HttpClient .create ();
449449 HttpExecuteResponse response = client .prepareRequest (HttpExecuteRequest .builder ()
450450 .request (SdkHttpRequest .builder ()
451451 .encodedPath (modifiedUri .getRawPath () + "?" + modifiedUri .getRawQuery ())
@@ -482,7 +482,7 @@ void getSignedUrlWithCustomPolicy_wildCardPath(KeyTestCase testCase) throws Exce
482482
483483
484484 URI modifiedUri = URI .create (signedUrl .url ().replace ("/specific-file" ,"/other-file" ));
485- SdkHttpClient client = ApacheHttpClient .create ();
485+ SdkHttpClient client = Apache5HttpClient .create ();
486486 HttpExecuteResponse response = client .prepareRequest (HttpExecuteRequest .builder ()
487487 .request (SdkHttpRequest .builder ()
488488 .encodedPath (modifiedUri .getRawPath () + "?" + modifiedUri .getRawQuery ())
@@ -518,7 +518,7 @@ void getSignedUrlWithCustomPolicy_wildCardPolicyResource_allowsAnyPath(KeyTestCa
518518
519519
520520 URI modifiedUri = URI .create (signedUrl .url ().replace ("/s3ObjectKey" ,"/foo/other-file" ));
521- SdkHttpClient client = ApacheHttpClient .create ();
521+ SdkHttpClient client = Apache5HttpClient .create ();
522522 HttpExecuteResponse response = client .prepareRequest (HttpExecuteRequest .builder ()
523523 .request (SdkHttpRequest .builder ()
524524 .encodedPath (modifiedUri .getRawPath () + "?" + modifiedUri .getRawQuery ())
0 commit comments