HTTP Forwarded Parser
Parse RFC 7239 Forwarded elements into ordered parameter lists without inferring proxy trust or validating addresses.
Description
Forwarded records proxy-chain information in comma-separated elements with parameters such as for, by, host and proto.
When to use HTTP Forwarded Parser
Use this tool to parse RFC 7239 Forwarded elements into ordered parameter lists without inferring proxy trust or validating addresses.
Prepare the header field value, cookie records or status code requested. Supply field values without a header-name prefix and preserve syntax for the parser to inspect.
How to use HTTP Forwarded Parser and understand its results
- Prepare the header field value, cookie records or status code requested. Supply field values without a header-name prefix and preserve syntax for the parser to inspect.
- Enter header using the field table and calculation rules, then run the tool.
- Read elements. The explanation below defines the units, signs, ordering and any flags or placeholder values.
- If the tool reports an input issue, correct the values and run it again. Apply the stated assumptions when interpreting a successfully returned result.
| Input field | Meaning | Value type; see rules below | Requirement |
|---|---|---|---|
| header | Forwarded field value. | string; maximum length: 1000000 | Required |
Paste the field value. Split outside quotes/angle brackets, require nonempty elements and valid name=value parameters, lowercase names, unquote values and remove quoted-pair escaping. Reject duplicate normalized names within an element; the same name in separate elements is allowed. Return ordered parameter lists.3
elements=comma groups of ordered semicolon-separated parameters Units, indexing, boundary conditions and exceptional cases are defined in the calculation rules above.
| Output field | Meaning | Value type |
|---|---|---|
| elements | Forwarded elements in field order. | list of list of object; minimum entries: 0; maximum entries: 100000; minimum entries: 0; maximum entries: 100000 |
{
"input": {
"header": "for=192.0.2.60;proto=https, for=\"[2001:db8::1]:4711\""
},
"output": {
"elements": [
[
{
"name": "for",
"value": "192.0.2.60"
},
{
"name": "proto",
"value": "https"
}
],
[
{
"name": "for",
"value": "[2001:db8::1]:4711"
}
]
]
}
} Limitations and assumptions
No proxy trust, IP validity, address decoding, protocol correctness or actual network path is verified. Unknown parameter names are retained.
Numeric inputs must be finite. Follow the calculation-specific rules for overflow, underflow and exceptional cases. Extremely large text inputs are rejected. Missing required fields, extra fields, wrong value types and violations of the calculation rules are input errors.
Alternative or Complementary methods
Use HTTP Link Header Parser: Parse RFC 8288 link targets and parameters while retaining quoted delimiters and repeated relation parameters. For a complementary task, use HTTP Header Name Normalizer: Validate an HTTP field name as an RFC token and convert it to lowercase for case-insensitive lookup.
Further background: RFC 7239: Forwarded HTTP Extension.
References
-
HTTP Forwarded Parser — tool.io
-
RFC 7239: Forwarded HTTP Extension — Internet Engineering Task Force
-
HTTP Content-Type Parser — tool.io
Similar or alternative tools
- HTTP Link Header Parser
Parse RFC 8288 link targets and parameters while retaining quoted delimiters and repeated relation parameters.
- HTTP Header Name Normalizer
Validate an HTTP field name as an RFC token and convert it to lowercase for case-insensitive lookup.