Skip to content

Commit

Permalink
fix: presigned custom header order (durch#309)
Browse files Browse the repository at this point in the history
  • Loading branch information
zifeo authored Apr 7, 2023
1 parent cb8a384 commit 86ae25c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion s3/src/bucket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2884,7 +2884,7 @@ mod test {
.presign_put(s3_path, 86400, Some(custom_headers))
.unwrap();

assert!(url.contains("host%3Bcustom_header"));
assert!(url.contains("custom_header%3Bhost"));
assert!(url.contains("/test/test.file"))
}

Expand Down
1 change: 1 addition & 0 deletions s3/src/signing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ pub fn authorization_query_params_no_sig(
}
}

signed_headers.sort();
let signed_headers = signed_headers.join(";");
let signed_headers = utf8_percent_encode(&signed_headers, FRAGMENT_SLASH);

Expand Down

0 comments on commit 86ae25c

Please sign in to comment.