Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prevent headers being removed #816

Merged
merged 3 commits into from
Aug 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions paws.common/NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# paws.common 0.7.5 (development)
* build endpoint with host_prefix (#804), thanks to @joseale2310 and @lyschoening for raising issue.
* fix `unix_time` ensure seconds is numeric (#804), thanks to @joseale2310 and @lyschoening for raising issue.
* fix stop anonymous credentials removing `x-amz-*` headers (#815) thanks to @cgostic for raising issue

# paws.common 0.7.4
* fix `transpose` to correctly parse lists with empty first elements (#791), thanks to @FMKerckhof for raising issue.
Expand Down
2 changes: 0 additions & 2 deletions paws.common/R/signer_v4.R
Original file line number Diff line number Diff line change
Expand Up @@ -466,8 +466,6 @@ get_uri_path <- function(url) {
# Clear down headers for anonymous credentials
# https://github.com/aws/aws-sdk-go/blob/a7b02935e4fefa40f175f4d2143ec9c88a5f90f5/aws/signer/v4/v4_test.go#L321-L355
anonymous_headers <- function(headers) {
found <- grepl("X-Amz-*", names(headers))
headers[found] <- ""
headers["Authorization"] <- ""
return(headers)
}
2 changes: 0 additions & 2 deletions paws.common/tests/testthat/test_signer_v4.R
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,4 @@ test_that("Test anonymous credentials", {
res <- v4_sign_request_handler(req)

expect_equal(res$http_request$header[["Authorization"]], "")
expect_equal(res$http_request$header[["X-Amz-Date"]], "")
expect_equal(res$http_request$header[["X-Amz-Content-Sha256"]], "")
})
Loading