Normalize only what is safe
05Different strings can identify the same resource, but generic normalization has limits.
DIAGRAMRead RFC section 6.2 ↗
RFC 3986 · § 6.2EXAMPLE
4 / 4
04
Remove HTTP’s default port.
The resulting example is http://example.org/~Ada.
Key idea: Do not lowercase an entire URI.
Rules & examples
Do not lowercase an entire URI.
- Scheme and host are case-insensitive; other components are generally case-sensitive unless the scheme says otherwise.
- Hexadecimal digits in percent encodings can be uppercased, and encoded unreserved characters can be decoded.
- Removing a default port is scheme-based normalization, not a universal port rule.
The examples simplify the wire representation. Follow the linked specification and application profile for implementation.
Sources
Protocol participantThreat or exceptionProtocol controlSimplified drawings · precise section references
New to this? Start hereA quick picture + helpful background
First, agree how to read the message.
An encoding tells a reader how to interpret bytes. A format tells it how values fit together. Correctly reading a value does not make that value trustworthy.
Helpful first, if these ideas are unfamiliar
These pictures are analogies to help you learn. The linked RFC explains the actual rules.
Related RFCs and changes
“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.
Read the updated RFC section ↗