>     public AuthenticationResponse apply(HttpResponse from) {
>        releasePayload(from);
> -      Builder<String, URI> builder = ImmutableMap.builder();
> -      for (Entry<String, String> entry : from.getHeaders().entries()) {
> -         if (entry.getKey().endsWith(URL_SUFFIX))
> -            builder.put(entry.getKey(), getURI(entry.getValue()));
> +
> +      // HTTP headers are case in-sensitive (RFC 2616) so we must allow for 
> that when looking an header names for the URL keyword
> +      //FIXME When Apache commons-collections 4 is out of Snapshot it will 
> provide generics for CaseInsensitiveMap 
> +      final CaseInsensitiveMap services = new CaseInsensitiveMap();
> +      for (final Entry<String, String> entry : from.getHeaders().entries()) {
> +         if (entry.getKey().toLowerCase().endsWith(URL_SUFFIX.toLowerCase()))
> +            services.put(entry.getKey(), getURI(entry.getValue()));

Can we do something like:

```
Map<String, String> map = new TreeMap<String, 
String>(String.CASE_INSENSITIVE_ORDER);
```

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

Reply via email to