Visual RFC.
ALL RFCs / RFC 6797
Read the RFC ↗
RFC 6797 / BROWSER TRANSPORT POLICY

Read directives without accepting a malformed policy

02

The header value is a semicolon-separated list of directives. A directive is an instruction such as max-age=300. Its syntax determines whether the browser can apply the policy at all.

RFC 6797 · § 6.1EXAMPLE
4 / 4
Read directives without accepting a malformed policyIn a separate secure response, process only the first of two HSTS fields; the server still violated its one-field requirement.Parse the policy, then apply itResponse headerField 1: max-age=300Field 2: max-age=0first onlyProcess field 1 → 300 secondsDo not process field 2Server MUST send only one fieldEach scene is a separate response example
04
Process only the first field in a multiple-field response.

Separate error-free secure response contains max-age=300 as its first HSTS field and max-age=0 as its second. The browser processes only the first. The server should have sent exactly one field.

Source for this drawing: RFC 6797 · Read RFC section 6.1 ↗

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

Ignore an invalid header as a whole; ignore only unknown directives inside an otherwise valid header.

  • max-age is REQUIRED and its value, after quoted-string unescaping if needed, is one or more decimal digits specifying seconds. includeSubDomains is OPTIONAL and has no value. Directive order does not matter and names are case-insensitive.
  • All directives MUST appear only once, including unrecognized ones. The browser MUST ignore a header containing invalid syntax or directive data. A duplicate max-age is not resolved by choosing a convenient value.
  • The browser MUST ignore unrecognized directives and process recognized directives when the header otherwise satisfies the requirements. A quoted max-age such as "300" is valid; a negative or fractional value is not.
  • If a secure response contains more than one HSTS header field, the browser MUST process only the first. This recovery rule does not permit servers to violate their one-field MUST.
  • An HTML meta element with http-equiv="Strict-Transport-Security" MUST NOT be heeded. A page tag is not the response-header mechanism.
DETAILS

The bounded teaching parser accepts an ASCII subset of the referenced HTTP grammar, quoted escapes and semicolons inside quoted unknown values. Its size limits are local resource bounds, not RFC maximums. It does not implement all historical line folding.

Read the RFC section ↗

All chapters in RFC 6797

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 ↗