Which of the following should be the URL for the email address ~a/[email protected]
?
mailto:~a/[email protected]
mailto:~a%[email protected]
Although most clients are able to handle (1), is (2) required by the RFCs?
EID 7919 says this, without commenting on what to do for delimiters in gen-delim
.
A number of characters that can appear in MUST be percent-encoded. These are the characters that cannot appear in a URI according to [STD66] as well as "%" (because it is used for percent-encoding) and all the characters in gen-delims except "@" and ":" (i.e., "/", "?", "#", "[", and "]"). Care has to be taken both when encoding as well as when decoding to make sure these operations are applied only once.
RFC 3986 does not require that sub-delimiters used in one component are encoded in other components. Specifically, RFC 3986 Section 2.1 (.1) states that a character requires encoding when it "is being used as a delimiter of, or within, the component."
According to RFC 3986, the mailto URI mailto:Mike&[email protected] is unambiguously the single addr-spec "Mike&[email protected]" because the path component of the mailto scheme does not use "&" as a sub-delimiter.
More comprehensively, the mailto URI mailto:Mike&[email protected]?subject=Use%20of%20%26&body=Should%20be%20fine%20in%20addr-spec must substitute "%26" for "&" in the value of the body header field because "&" is a query component sub-delimiter in the mailto scheme, but the query is the only component where this is required.
However, RFC3986 says that "/" is a gen-delim, while "&" is a sub-delim:
gen-delims = ":" / "/" / "?" / "#" / "[" / "]" / "@"
sub-delims = "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / "="
[...]
A subset of the reserved characters (gen-delims) is used as delimiters of the generic URI components described in Section 3.
And in section 3.3:
segment = *pchar [...] unreserved / pct-encoded / sub-delims / ":" / "@"
Does this means that the /
must be encoded?