Skip to content

Commit 4715c4c

Browse files
author
Sabrina Juarez Garcia
committed
getBlobClient SDK method returns URL encoded
Do not decode URL as the recommendation is to leave it as is to be passed to other methods
1 parent 7c853f1 commit 4715c4c

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

gxcloudstorage-azureblob-latest/src/main/java/com/genexus/db/driver/ExternalProviderAzureStorageLatest.java

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -244,10 +244,7 @@ private String getResourceUrl(String externalFileName, ResourceAccessControlList
244244
//getBlobClient method returns URL encoded
245245
//https://azuresdkdocs.z19.web.core.windows.net/java/azure-storage-blob/12.30.0/com/azure/storage/blob/BlobContainerClient.html#getBlobClient(java.lang.String)
246246
////https://github.com/Azure/azure-sdk-for-java/issues/21610
247-
248-
String url = blobClient.getBlobUrl();
249-
return url;
250-
//return safeDecodeUrl(url);
247+
return blobClient.getBlobUrl();
251248
}
252249
}
253250

@@ -607,17 +604,6 @@ public String getObjectNameFromURL(String url) {
607604
return objectName;
608605
}
609606

610-
private static String safeDecodeUrl(String uri) {
611-
if (uri == null || uri.isEmpty()) return uri;
612-
boolean hasEncodedSegments = uri.matches(".*%[0-9A-Fa-f]{2}.*");
613-
if (!hasEncodedSegments) return uri;
614-
try {
615-
return java.net.URLDecoder.decode(uri);
616-
} catch (IllegalArgumentException e) {
617-
return uri;
618-
}
619-
}
620-
621607
private String getExternalFileName(String externalFileName)
622608
{
623609
//Defensive code, as externalFileName may have a leading / and this causes a double / at blob uri

0 commit comments

Comments
 (0)