Visual RFC.
ALL RFCs / RFC 7239
Read the RFC ↗
RFC 7239 / FORWARDED HTTP REQUESTS

Keep pairs together and preserve list order

02

Semicolons join parameters for one proxy observation. Commas separate observations, except inside a quoted string.

RFC 7239 · § 4EXAMPLE
4 / 4
Keep pairs together and preserve list orderFour grouping examples. A single element groups for and proto with a semicolon. Appending after a comma adds a second observation without moving proto to it. A separate repeated-field example includes an illustrative extension value a,b;c inside quotes: neither punctuation character splits that value, and the second field follows the first in the same ordered list. A duplicate for and For in one element is invalid because parameter names are case insensitive and MUST NOT repeat within one element; the stopped parse does not prescribe an HTTP error code.Semicolons group; commas separate observationsfor=192.0.2.43;For=198.51.100.17accept as one valid elementfor and For are the same parameter nameMUST NOT repeat within one elementNo specific error response invented
04
Stop a duplicate parameter in one element.

for=192.0.2.43;For=198.51.100.17 repeats the same case-insensitive parameter inside one element. This violates the MUST NOT; it is not a two-hop list. The guide flags invalid input without inventing an RFC-mandated error response.

Source for this drawing: RFC 7239 · Read RFC section 4 ↗

Protocol participantThreat or exceptionProtocol controlSimplified drawings · precise section references
New to this? Start hereA quick picture + helpful background

A message needs an address.

Think of a packet as a small addressed envelope. Devices pass it onward; transport protocols decide what delivery promises an application gets.

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.

KEY POINT

Parse the grouping before assigning meaning.

  • Parameter names are case-insensitive. Each parameter MUST NOT occur more than once within one element; the same name can appear in different elements.
  • Values are HTTP tokens or quoted strings. Quotes protect commas and semicolons inside a value; escaped characters are unescaped before interpreting the value.
  • A list can span several Forwarded fields; preserve their order and update the correct field. A proxy MUST ensure this even when multiple fields exist.
  • Extension parameters SHOULD be registered; a widely deployed extension SHOULD also be standardized. The example key here is illustrative, with no standardized meaning.
DETAILS

The comma-list rule is the #rule notation referenced in RFC 7230 §7, also explained by current RFC 9110 §5.6.1. Reported erratum 5275 is not a verified correction. Via and Forwarded lists cannot be paired by index: proxies may update either, both or neither. Mixed X-Forwarded-* fields also may lack enough ordering information for safe conversion.

Read the RFC section ↗

All chapters in RFC 7239

Drawing view

Scroll the drawing to see every part. Playback controls stay above it.

RFC 9700 / CHAPTERS

Chapters

For full details, tables, algorithms, and exceptions, read the original RFC.

RFC status and corrections ↗