Re: HTTP Message Signatures [RFC 9421] percent-encoded URLs normalisation

On Sep 19, 2025, at 10:11, Thibault Meunier <ot-ietf@thibault.uk> wrote:
> 
> The two statements appear to be in conflict.

I don’t think they are, see below.

> I'm not sure which one applies with regard to percent-encoded octets.
> 
> Let's take the example from [HTTP] section 4.2.3 `/%7Esmith`
> 
> Which of the following should be provided when used as "@path":
> 
> 1. "/~smith"
> 2. "/%7Esmith"
> 
> Most implementations seems to use 2.

Please see RFC 3986, 2.2.
To save some busywork, RFC 3986, 2.3 says:

      unreserved  = ALPHA / DIGIT / "-" / "." / "_" / "~"

So ~ is definitely among the characters that normalize to themselves, i.e., it is normalized to ~, not %7E.

Note that RFC 3986 2.4 para 2 also uses ~ as an example.

Grüße, Carsten

Received on Friday, 19 September 2025 14:59:03 UTC