andreeastroe96 commented on code in PR #1861: URL: https://github.com/apache/jackrabbit-oak/pull/1861#discussion_r1869472695
########## oak-blob-cloud-azure/src/main/java/org/apache/jackrabbit/oak/blob/cloud/azure/blobstorage/AzureBlobStoreBackend.java: ########## @@ -874,24 +748,23 @@ URI createHttpDownloadURI(@NotNull DataIdentifier identifier, } String key = getKeyName(identifier); - SharedAccessBlobHeaders headers = new SharedAccessBlobHeaders(); - headers.setCacheControl(String.format("private, max-age=%d, immutable", httpDownloadURIExpirySeconds)); + BlobHttpHeaders headers = new BlobHttpHeaders() + .setCacheControl(String.format("private, max-age=%d, immutable", httpDownloadURIExpirySeconds)); String contentType = downloadOptions.getContentTypeHeader(); - if (! Strings.isNullOrEmpty(contentType)) { + if (!Strings.isNullOrEmpty(contentType)) { headers.setContentType(contentType); } String contentDisposition = downloadOptions.getContentDispositionHeader(); - if (! Strings.isNullOrEmpty(contentDisposition)) { + if (!Strings.isNullOrEmpty(contentDisposition)) { headers.setContentDisposition(contentDisposition); } uri = createPresignedURI(key, - EnumSet.of(SharedAccessBlobPermissions.READ), + new BlobSasPermission().setReadPermission(true), httpDownloadURIExpirySeconds, - headers, Review Comment: According to the comments on the V8 version: /* set empty headers as blank string due to a bug in Azure SDK * Azure SDK considers null headers as 'null' string which corrupts the string to sign and generates an invalid * sas token * */ those headers were empty due to a bug in the Azure SDK. I read in the documentation that the bug was solved in azure sdk 12, therefore, I thought it would not be a breaking change to remove those headers since there was no actual logic implemented around them -- 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. To unsubscribe, e-mail: oak-dev-unsubscr...@jackrabbit.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org