Escape data, preserve delimiters
02Percent encoding represents an octet with a percent sign and two hexadecimal digits.
%252F decodes once to %2F, not directly to a delimiter.
Key idea: An encoded delimiter can mean something different from the delimiter itself.
Rules & examples
An encoded delimiter can mean something different from the delimiter itself.
- Unreserved characters are letters, digits, hyphen, period, underscore, and tilde.
- A reserved character used as data must be percent-encoded when it would conflict with a delimiter.
- Do not encode or decode the same string more than once.
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.