-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
When uploading a ZIP file to Azure Blob Storage, the file upload itself succeeds, but the call to setHttpHeaders() fails with an “illegal characters in URL path” error. This only happens when the file name starts with an uppercase J. The same flow works as expected when the file name starts with a lowercase j.
The URI contain illegal characters: /containerName/folderName%2Fdev%2F2026-03-26%2FJL810098.zip?comp=properties
com.azure.storage.common.implementation.StorageImplUtils.sendRequest(StorageImplUtils.java:511)\r\n\tat com.azure.storage.blob.specialized.BlobClientBase.setHttpHeadersWithResponse(BlobClientBase.java:1832)\r\n\tat com.azure.storage.blob.specialized.BlobClientBase.setHttpHeaders(BlobClientBase.java:1788)\r\n\tat
Steps to reproduce the behavior:
BlobClient blobClient = container.getBlobClient(blobName);
try (InputStream in = Files.newInputStream(zipPath)) {
blobClient.upload(in, Files.size(zipPath), true);
blobClient.setHttpHeaders(new BlobHttpHeaders().setContentType("application/zip"));
}
- OS: Windons
- IDE: intellij
- Library/Libraries: azure-storage-blob-12.31.2
- Java version: 17