Skip to content

fix: encode path in url for aws_sigv4_url/1#433

Merged
wojtekmach merged 1 commit into
wojtekmach:mainfrom
fahchen:fix/fahchen/encode-path
Nov 20, 2024
Merged

fix: encode path in url for aws_sigv4_url/1#433
wojtekmach merged 1 commit into
wojtekmach:mainfrom
fahchen:fix/fahchen/encode-path

Conversation

@fahchen

@fahchen fahchen commented Nov 20, 2024

Copy link
Copy Markdown
Contributor

I encountered a SignatureDoesNotMatch when the object key contains characters that need to be escaped, such as spaces or CJK characters.

The path has been encoded at 168L, so we just update the url before returning.

path = URI.encode(url.path || "/", &(&1 == ?/ or URI.char_unreserved?(&1)))

@wojtekmach

Copy link
Copy Markdown
Owner

Thank you!

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.

2 participants