Authority has its own structure
04User information, host, and port are separate subcomponents; IP literals need brackets.
The generic grammar identifies the port component; the scheme defines defaults.
Key idea: Read the host after parsing, not by guessing from the text.
Rules & examples
Read the host after parsing, not by guessing from the text.
- The generic authority form is [userinfo@]host[:port].
- IPv6 address literals are enclosed in square brackets in a URI host.
- Use of a password in userinfo is deprecated.
The examples simplify the wire representation. Follow the linked specification and application profile for implementation.
Sources
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.
The revised generic syntax incorporates bracketed IP-literal hosts from RFC 2732 and expands normalization and comparison guidance.
Read the updated RFC section ↗