> 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()));
@demobox Just in the swift and cloudfiles* projects. We would have to do live
testing before committing it (after the changes are finalized).
@andrewgaul In that case, isn't the case insensitivity only being in the
TreeMap for ordering and not for when doing a get()?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/76/files#r5467402