Description
Unescape backslash pairs in quoted values and return filename and quoted.
HTTP fields use specific token, quoted-string, range, quality-weight, and entity-tag grammars. Quoted text is not automatically safe as a filename or equivalent to an escaped string in another language. Parsing one parameter or marker is separate from interpreting a full request or response.
Unescape backslash pairs in quoted values and return filename and quoted.
When to use this tool
Use HTTP Contentdisposition Filename Parameter when you need to parse this one supported HTTP field component or parameter token.
How to use the tool and how it works
- Enter parameter. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read filename, quoted. Inspect quoted before interpreting the associated values.
Accept a case-insensitive filename= parameter followed by a token value or supported double-quoted value. Unescape backslash pairs in quoted values and return filename and quoted.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| parameter | Parameter | Required. Text; maximum UTF-16 length 8192. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| filename | Unescaped supplied filename text; not sanitized for filesystem use. | Required. Text; maximum UTF-16 length 8192. |
| quoted | Quoted | Required. Boolean. |
{
"input": {
"parameter": "filename=\"report 1.txt\""
},
"output": {
"filename": "report 1.txt",
"quoted": true
}
} Limitations and assumptions
- Extended filename* parameters are unsupported. Returned names are unsanitized text and may contain path-like or other unsafe-to-use characters; the tool does not authorize filesystem use, validate a full header, or save a file.
- 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
Use a full header parser and the relevant HTTP semantics when request behavior depends on the result. Check extended parameters, field context, and downstream use of returned text separately.
References
Similar or alternative tools
- HTTP Link Parameter Single Quoted Token
Parse an HTTP name and double-quoted parameter value, lowercasing the name and removing supported backslash escapes.
- Mime Parameter Language Separator
Split the charset/language/value fields of a supplied extended MIME parameter without percent decoding.