Fix s3 `checksum-mode` header in presigned requests (#4000)
## Motivation and Context <!--- Why is this change required? What problem does it solve? --> <!--- If it fixes an open issue, please link to the issue here --> Fixes a bug reported in https://github.com/awslabs/aws-sdk-rust/issues/1253 with flexible checksum headers sneaking into presigned requests. ## Description <!--- Describe your changes in detail --> Short circuit the closure that mutates the `checksum-mode` header when we detect that we are making a presigned request. ## Testing <!--- Please describe in detail how you tested your changes --> <!--- Include details of your testing environment, and the tests you ran to --> <!--- see how your change affects other areas of the code, etc. --> Update our presigned canary tests to do both PUT and GET and have extra headers included that aren't in the query string that will expose this issue if there is a regression. ## Checklist <!--- If a checkbox below is not applicable, then please DELETE it rather than leaving it unchecked --> - [x] For changes to the AWS SDK, generated SDK code, or SDK runtime crates, I have created a changelog entry Markdown file in the `.changelog` directory, specifying "aws-sdk-rust" in the `applies_to` key. ---- _By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._
Loading
Please register or sign in to comment