This is an automated email from the ASF dual-hosted git repository.

gaul pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jclouds.git


The following commit(s) were added to refs/heads/master by this push:
     new 0787bb8  Fix location header case sensitive
0787bb8 is described below

commit 0787bb891bb35e972605658d749768841616e183
Author: Simone Locci <[email protected]>
AuthorDate: Mon Jul 26 16:03:50 2021 +0200

    Fix location header case sensitive
---
 .../main/java/org/jclouds/azurecompute/arm/functions/URIParser.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git 
a/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/functions/URIParser.java
 
b/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/functions/URIParser.java
index f67e7e2..5493f04 100644
--- 
a/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/functions/URIParser.java
+++ 
b/providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/functions/URIParser.java
@@ -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;

Reply via email to