mirror of https://github.com/apache/jclouds.git
Fix location header case sensitive
This commit is contained in:
parent
d861768d49
commit
0787bb891b
|
@ -28,9 +28,9 @@ import com.google.common.base.Function;
|
|||
@Singleton
|
||||
public class URIParser implements Function<HttpResponse, URI> {
|
||||
public URI apply(final HttpResponse from) {
|
||||
if (from.getStatusCode() == 202 && from.getHeaders().containsKey("Location")){
|
||||
String uri = from.getFirstHeaderOrNull("Location");
|
||||
return URI.create(uri);
|
||||
String locationUri;
|
||||
if (from.getStatusCode() == 202 && (locationUri = from.getFirstHeaderOrNull("Location")) != null){
|
||||
return URI.create(locationUri);
|
||||
|
||||
} else if (from.getStatusCode() == 200 || from.getStatusCode() == 204){
|
||||
return null;
|
||||
|
|
Loading…
Reference in New Issue