Fix issue with double encode of path in canonical request #451
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of changes:
This change adds a signing configuration for
uri_encode_path(defaults to True) and enables double encoding of path when constructing the canonical request.The sigv4 test suite for normalize-path/get-space is out of date from the updated CRT test. Specifically, the new request has the URI path in the request as
GET /example space/(incldues the space and is NOT uri encoded). The request we have in our older test suite hasGET /example%20space/(starts off uri encoded). We can't easily fix our request path in the test suite as theRawRequestclass we are using does not allow this, so without bigger changes to the test suite, we can't fix that.Note that for S3 you do not normalize URI paths. For example, if you have a bucket with an object named my-object//example//photo.user, use that path. Normalizing the path to my-object/example/photo.user will cause the request to fail. For more information, see Create a Canonical Request in the S3 API Reference.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.