diff --git a/doc/xml/release.xml b/doc/xml/release.xml
index 2e4efe59d..30a26d3b4 100644
--- a/doc/xml/release.xml
+++ b/doc/xml/release.xml
@@ -49,6 +49,10 @@
Add macros to create constant Buffer
objects.
+
+ Add missing httpUriEncode()
in S3 request.
+
+
Add unsigned int
Variant
type and update code to use it.
diff --git a/src/storage/driver/s3/storage.c b/src/storage/driver/s3/storage.c
index 50b9063e3..40863116e 100644
--- a/src/storage/driver/s3/storage.c
+++ b/src/storage/driver/s3/storage.c
@@ -336,7 +336,7 @@ storageDriverS3Request(
// Generate authorization header
storageDriverS3Auth(
- this, verb, uri, query, storageDriverS3DateTime(time(NULL)), requestHeader,
+ this, verb, httpUriEncode(uri, true), query, storageDriverS3DateTime(time(NULL)), requestHeader,
body == NULL || bufUsed(body) == 0 ?
STRDEF("e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855") :
bufHex(cryptoHashOne(HASH_TYPE_SHA256_STR, body)));
diff --git a/test/src/module/storage/s3Test.c b/test/src/module/storage/s3Test.c
index 856200872..6398ee96b 100644
--- a/test/src/module/storage/s3Test.c
+++ b/test/src/module/storage/s3Test.c
@@ -89,7 +89,7 @@ testS3Server(void)
// storageDriverS3NewRead() and StorageDriverS3FileRead
// -------------------------------------------------------------------------------------------------------------------------
// Ignore missing file
- harnessTlsServerExpect(testS3ServerRequest(HTTP_VERB_GET, "/file.txt", NULL));
+ harnessTlsServerExpect(testS3ServerRequest(HTTP_VERB_GET, "/fi%26le.txt", NULL));
harnessTlsServerReply(testS3ServerResponse(404, "Not Found", NULL, NULL));
// Error on missing file
@@ -543,7 +543,7 @@ testRun(void)
// storageDriverS3NewRead() and StorageDriverS3FileRead
// -------------------------------------------------------------------------------------------------------------------------
TEST_RESULT_PTR(
- storageGetNP(storageNewReadP(s3, strNew("file.txt"), .ignoreMissing = true)), NULL, "ignore missing file");
+ storageGetNP(storageNewReadP(s3, strNew("fi&le.txt"), .ignoreMissing = true)), NULL, "ignore missing file");
TEST_ERROR(
storageGetNP(storageNewReadNP(s3, strNew("file.txt"))), FileMissingError,
"unable to open '/file.txt': No such file or directory");