Skip to content

Commit

Permalink
remove host http header when using rustls in order
Browse files Browse the repository at this point in the history
for storage.googleapis.com to function with rustls
  • Loading branch information
saroh committed Jun 8, 2022
1 parent 0df121f commit 62e2017
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Expand Up @@ -5,7 +5,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

(Please put changes here.)
- Remove host HTTP header when using rustls

## [0.48.0] - 2022-04-24

Expand Down
4 changes: 4 additions & 0 deletions rusoto/core/src/request.rs
Expand Up @@ -444,6 +444,10 @@ where
message: format!("error building request: {}", err),
})?;

// we use HTTP/2 with rustls, the host header is required to sign the request
// Google cloud storage rejects HTTP/2 payloads containing a host header
#[cfg(any(feature = "rustls", feature = "rustls-webpki"))]
hyper_headers.remove("host");
*http_request.headers_mut() = hyper_headers;

let f = client.request(http_request);
Expand Down

0 comments on commit 62e2017

Please sign in to comment.