Discussion:
RFC7208 upper case macro expansion ambiguity
Stuart D. Gathman via spf-discuss
2014-08-02 18:19:17 UTC
Permalink
RFC7208 describes upper case macro expansion as follows:

Uppercase macros expand exactly as their lowercase equivalents, and
are then URL escaped. URL escaping MUST be performed for characters
not in the "unreserved" set, which is defined in [RFC3986].

RFC3986 tells us that:

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

The question is, may an implementation URL escape chars that *are* in
the unreserved set? For instance, if localpart is "~ralf",
is an %{L} expansion of "%7Eralf" acceptable? Or should the
test suite mandate an expansion of "~ralf"? What about silly
choices like expanding ALPHA chars?
--
Stuart D. Gathman <***@gathman.org>
"Confutatis maledictis, flamis acribus addictis" - background song for
a Microsoft sponsored "Where do you want to go from here?" commercial.
Scott Kitterman via spf-discuss
2014-08-02 18:32:08 UTC
Permalink
Post by Stuart D. Gathman via spf-discuss
Uppercase macros expand exactly as their lowercase equivalents, and
are then URL escaped. URL escaping MUST be performed for characters
not in the "unreserved" set, which is defined in [RFC3986].
unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
The question is, may an implementation URL escape chars that *are* in
the unreserved set? For instance, if localpart is "~ralf",
is an %{L} expansion of "%7Eralf" acceptable? Or should the
test suite mandate an expansion of "~ralf"? What about silly
choices like expanding ALPHA chars?
I think no. As you point out, if you can expand "~" you can expand anything
and then you get silly results.

Scott K

Loading...