Description
Require charset to be a nonempty HTTP token, lowercase it, and prepend charset= for parameter.
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.
Require charset to be a nonempty HTTP token, lowercase it, and prepend charset= for parameter.
When to use this tool
Use Content Type Charset Single Parameter 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 charset. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read parameter. Use the output convention below.
Require charset to be a nonempty HTTP token, lowercase it, and prepend charset= for parameter.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| charset | Charset | Required. Text; maximum UTF-16 length 8192. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| parameter | Parameter | Required. Text; maximum UTF-16 length 8192. |
{
"input": {
"charset": "UTF-8"
},
"output": {
"parameter": "charset=utf-8"
}
} Limitations and assumptions
- This formats one parameter without selecting a registered encoding or parsing a complete Content-Type header.
- 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
Similar or alternative tools
- HSTS Include Sub Domains Flag
Reject CR/LF and split headerValue at semicolons outside quoted strings, respecting backslash escapes inside quotes.
- Csp Nonce Source Token
Wrap it as a quoted nonce sourceToken.