> @@ -63,4 +63,17 @@ public void testReplaceLocalhost() {
>        assertEquals(md, new AuthenticationResponse("token", 
> ImmutableMap.<String, URI> of("X-Storage-Url", URI
>                 .create("http://fooman:8080/v1/token";))));
>     }
> +
> +   public void testHandleHeadersCaseInsensitively() {
> +      ParseAuthenticationResponseFromHeaders parser = 
> i.getInstance(ParseAuthenticationResponseFromHeaders.class);
> +      parser = parser.setHostToReplace("fooman");
> +
> +      HttpResponse response = 
> HttpResponse.builder().statusCode(204).message("No Content")
> +              .addHeader("x-auth-token", "token")
> +              .addHeader("x-storage-token", "token")
> +              .addHeader("x-storage-url", 
> "http://127.0.0.1:8080/v1/token";).build();
> +      AuthenticationResponse md = parser.apply(response);
> +      assertEquals(md, new AuthenticationResponse("token", 
> ImmutableMap.<String, URI> of("x-storage-url".toLowerCase(), URI
> +              .create("http://fooman:8080/v1/token";))));
> +   }

Verified that this fails without the change below

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/76/files#r5467673

Reply via email to