Skip to content

Conversation

@alextwoods
Copy link
Contributor

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 has GET /example%20space/ (starts off uri encoded). We can't easily fix our request path in the test suite as the RawRequest class 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.

@alextwoods alextwoods requested a review from a team as a code owner March 18, 2025 19:02
nateprewitt
nateprewitt previously approved these changes Mar 18, 2025
Copy link
Contributor

@nateprewitt nateprewitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor cleanup, otherwise looks good.

@alextwoods alextwoods merged commit fed8e9f into smithy-lang:develop Mar 18, 2025
2 checks passed
@alextwoods alextwoods deleted the fix_path_encoding branch March 18, 2025 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants