HTTP Link Header Parser
Parse RFC 8288 link targets and parameters while retaining quoted delimiters and repeated relation parameters.
Description
A Link field relates a target URI reference to the current resource through named parameters such as rel.
When to use HTTP Link Header Parser
Use this tool to parse RFC 8288 link targets and parameters while retaining quoted delimiters and repeated relation parameters.
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 Link Header 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 links. 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 | Link field value. | string; maximum length: 1000000 | Required |
Paste the field value. Split commas and semicolons outside quoted strings and angle brackets; require each target to be enclosed in < > without whitespace. Lowercase parameter names, unquote values and remove quoted-pair escaping. Preserve target text, value case, parameter order and duplicates. Empty comma groups are skipped.3
links=ordered angle-bracket targets with ordered name/value parameters Units, indexing, boundary conditions and exceptional cases are defined in the calculation rules above.
| Output field | Meaning | Value type |
|---|---|---|
| links | Links in header order. | list of object; minimum entries: 0; maximum entries: 100000 |
{
"input": {
"header": "</next?page=2>; rel=\"next\"; title=\"Next, page\", <https://example.com/help>; rel=help"
},
"output": {
"links": [
{
"target": "/next?page=2",
"parameters": [
{
"name": "rel",
"value": "next"
},
{
"name": "title",
"value": "Next, page"
}
]
},
{
"target": "https://example.com/help",
"parameters": [
{
"name": "rel",
"value": "help"
}
]
}
]
}
} Limitations and assumptions
No URI resolution, fetching, relation selection or complete semantic validation is supplied. Unbalanced quoting, invalid parameters and header controls are input errors.
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 Forwarded Parser: Parse RFC 7239 Forwarded elements into ordered parameter lists without inferring proxy trust or validating addresses. For a complementary task, use HTTP Content-Disposition Parser: Parse a disposition type and unquote its parameters, preserving RFC 5987 extended values for caller interpretation.
Further background: RFC 8288: Web Linking.
References
-
HTTP Link Header Parser — tool.io
-
RFC 8288: Web Linking — Internet Engineering Task Force
-
HTTP Content-Type Parser — tool.io
Similar or alternative tools
- HTTP Forwarded Parser
Parse RFC 7239 Forwarded elements into ordered parameter lists without inferring proxy trust or validating addresses.
- HTTP Content-Disposition Parser
Parse a disposition type and unquote its parameters, preserving RFC 5987 extended values for caller interpretation.