snvijaya commented on a change in pull request #1842: HADOOP-16730 : ABFS: Add 
Authorizer Interface
URL: https://github.com/apache/hadoop/pull/1842#discussion_r384442045
 
 

 ##########
 File path: 
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsUriQueryBuilder.java
 ##########
 @@ -59,6 +64,20 @@ public String toString() {
         throw new IllegalArgumentException("Query string param is not 
encode-able: " + entry.getKey() + "=" + entry.getValue());
       }
     }
+    // append SAS Token
+    if (sasToken != null) {
+      sasToken = sasToken.startsWith(AbfsHttpConstants.QUESTION_MARK)
+          ? sasToken.substring(1)
+          : sasToken;
 
 Review comment:
   Uribuilder toString() will auto add '?' at the start. Like in the case of 
the test SASGenerator code added to this PR, the SAS token generator would end 
up having a '?'. SAS token being a query URL it might be better to handle to 
presence or absence for '?' in the received token ?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to