Description
Reject CR/LF and split headerValue at semicolons outside quoted strings, respecting backslash escapes inside quotes.
HTTP response headers and content-security tokens carry separate pieces of a browser policy. Recognizing one directive or formatting one token does not establish that the complete policy is valid or effective.
Reject CR/LF and split headerValue at semicolons outside quoted strings, respecting backslash escapes inside quotes.
When to use this tool
Use HSTS Include Sub Domains Flag when you need a narrowly scoped header component check or formatter before assembling and testing a complete response policy.
How to use the tool and how it works
- Enter headerValue. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read includeSubDomains. Inspect includeSubDomains before interpreting the associated values.
Reject CR/LF and split headerValue at semicolons outside quoted strings, respecting backslash escapes inside quotes. Require closed quoting, trim spaces and tabs around directives, and detect an exact case-insensitive includeSubDomains token.1
includeSubDomains extends a valid HSTS policy to subdomains. Its presence alone does not establish an effective policy: max-age=0 removes the cached policy, including its subdomain setting.2
| Input field | Meaning and units | Accepted input |
|---|---|---|
| headerValue | HSTS header value only, without the field name. This is a lexical directive-presence check. | Required. Text; maximum UTF-16 length 8192. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| includeSubDomains | Include Sub Domains | Required. Boolean. |
{
"input": {
"headerValue": "max-age=31536000; includeSubDomains"
},
"output": {
"includeSubDomains": true
}
} Limitations and assumptions
- This does not validate max-age, duplicate directives, TLS delivery, or the complete HSTS policy; a value-bearing includeSubDomains spelling does not match.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
Alternative or Complementary methods
Parse the complete header and test its behavior in the intended browser when policy effectiveness matters.
References
-
Calculation and input contract: web/hsts-include-sub-domains-flag — tool.io
-
HTTP Strict Transport Security (HSTS), RFC 6797 — RFC Editor / IETF
Similar or alternative tools
- Csp Nonce Source Token
Wrap it as a quoted nonce sourceToken.
- Content Type Charset Single Parameter
Require charset to be a nonempty HTTP token, lowercase it, and prepend charset= for parameter.