RFC 2557 tests

AssertionSectionTestQuote/Description
rfc2557-14.4.1 Encoding of URIs containing inappropriate characters rfc2557-BF-01.htm [if a URI contains characters that are inappropriate for an RFC 822 header,] all spaces and other illegal characters in it must be encoded using one of the methods described in [MIME3] section 4. [The encoded word must be preceded with "=?UTF-8?Q?" and ended with "?="
  • 8-bit, non-ASCII characters: 0xA1 - 0xFF becomes "=A1" - "=FF"
  • special characters :
    • U+0022 is "=22"
    • "(" is "=28"
    • ")" is "=29"
    • "," is "=2C"
    • "/" is "=2F"
    • ":" is "=3A"
    • ";" is "=3B"
    • "<" is "=3C"
    • "=" is "=3D"
    • ">" is "=3E"
    • "?" is "=3F"
    • "@" is "=40"
    • "[" is "=5B"
    • "]" is "=5D"
    • "`" is "=60"
  • Horizontal tab is "=09"
For example, "dir/ThisExample.jpg" becomes
"=?UTF-8?Q?dir=2FThisExample=2Ejpg?=" ]
rfc2557-24.4.1 Encoding of URIs containing inappropriate characters rfc2557-BF-01.mx This encoding MUST only be done in the header, not in the HTML text.
rfc2557-34.4.1 Encoding of URIs containing inappropriate characters rfc2557-BF-01.mx Receiving clients MUST decode the [MIME3] encoding in the heading before comparing URIs in body text to URIs in Content-Location headers.
rfc2557-44.4.2 Folding of long URIs rfc2557-BF-01.mx Encoding as discussed in clause 4.4.1 MUST be done before such folding.
rfc2557-54.4.2 Folding of long URIs rfc2557-BF-01.mx ... Folding ... using the algorithm defined in [RFC2017] section 3.1. [
  1. A check is made to make sure that all occurrences of SPACE, CTLs, double quotes, backslashes, and 8-bit characters in the URL string are already encoded using the URL encoding scheme specified in RFC 1738. [
    • U+0000 - U+001F are "%00" - "%1F", U+007F is "%7F"
    • " " is "%20"
    • "#" is "%23"
    • "%" is "%25"
    • "&" is "%26"
    • "`" is "%27"
    • "\" is "%5C"
    • "^" is "%5E"
    • "{" is "%7B"
    • "|" is "%7C"
    • "}" is "%7D"
    • "~" is "%7E"
  2. The resulting URL string is broken up into substrings of 40 characters or less.
  3. Each substring is placed in a URL-parameter string as a URL-word, separated by one or more spaces.
]
rfc2557-6 5. Base URIs for resolution of relative URIs rfc2557-BF-02.mx When the methods above do not yield an absolute URI, a base URL of "thismessage:/" MUST be employed.