Skip to content

Conversation

@AkshatM
Copy link
Contributor

@AkshatM AkshatM commented Sep 18, 2025

For the authority, path, and scheme components, RFC 9421 (by citing Section 4.3.2 of RFC 3968) requires that

Characters other than those in the "reserved" set are equivalent to
their percent-encoded octets: the normal form is to not encode them.

This implies that we need to ensure we perform percent decoding to arrive at the normal form, ensuring that percent-encoded URLs and their non-encoded forms are treated as equivalent.

This change adds the necessary requirements and supplies a test for the same.

Note

I'm actually not entirely sure if we must do percent-decoding - I'm discussing this privately with @thibmeu . In the event we discover that percent-decoding is not required, we should still enforce hostname and scheme lowercasing as well as treating an empty path string correctly during signing, which this PR introduces for sure.

@AkshatM AkshatM force-pushed the fix_normalization branch 2 times, most recently from 6d92740 to a19f9c3 Compare September 18, 2025 21:48
For the authority, path, and scheme components, RFC 9421 requires that

> Characters other than those in the "reserved" set are equivalent to
> their percent-encoded octets: the normal form is to not encode them.

This implies that we need to ensure we perform percent decoding to arrive
at the normal form, ensuring that percent-encoded URLs and their
non-encoded forms are treated as equivalent.
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.

1 participant