nacx commented on this pull request.


> +      }
+      utils.logRequest(signatureLog, request, "<<");
+      return request;
+   }
+   
+   /** 
+   * this filter method is applied only for the cases with SAS Authentication. 
+   * 
+   */
+   public HttpRequest filterSAS(HttpRequest request, String credential) throws 
HttpException {
+      String containerName = null;
+      String blobName = null;
+      URI requestUri = request.getEndpoint();
+      try {
+         String[] parametersArray = cutUri(requestUri); 
+         containerName = parametersArray[1];

I'd simplify the followign code to:
```java
UriBuilder endpoint = Uris.uriBuilder(storageUrl).appendPath(containerName);
if (parametersArray.length == 3) {
   endpoint..appendPath(parametersArray[2])..query(credential);
} else {
   endpoint.query("restype=container&" + credential);
}
return 
removeAuthorizationHeader(replaceDateHeader(request.toBuilder().endpoint(endpoint.build()).build()));
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1270#pullrequestreview-202024387

Reply via email to