Description
Split one HTTP field line at its first colon, validating a nonempty token name while retaining raw value whitespace; CR/LF or obs-fold are rejected.
HTTP field names are case-insensitive, while values follow each field’s own grammar. Repeated occurrences sometimes form lists but cannot always be combined. Quoted values, optional spaces/tabs and quality weights need their own treatment; the tools here use explicit field records or a stated text subset.1
Split one HTTP field line at its first colon, validating a nonempty token name while retaining raw value whitespace; CR/LF or obs-fold are rejected.
When to use this tool
Use this tool to split one HTTP field line at its first colon, validating a nonempty token name while retaining raw value whitespace; CR/LF or obs-fold are rejected.
How to use the tool and how it works
- Enter line using the field definitions below.
- Run the operation. Correct input errors before interpreting an output.
- Read result.name, result.value. Use the ordering, boundary rules and absence conditions described below.
Reject line breaks, split at the first colon, require a token-safe name, and preserve every character after the colon as value.2
| Input field | Meaning and units | Accepted input |
|---|---|---|
| line | One header line without CR or LF. | Text, at most 8,192 UTF-16 code units; the operation’s grammar also applies. |
| Output field | Interpretation |
|---|---|
| result | Object containing the named fields below. |
| result.name | Original header name preceding the first colon. |
| result.value | Half-open retained-value span in the OWS operation, or unchanged field text after the first colon. |
{
"input": {
"line": "X-A: a:b"
},
"output": {
"result": {
"name": "X-A",
"value": " a:b"
}
}
} Limitations and assumptions
- Leading value whitespace is retained; the remainder is not fully validated as a field value.
- Explicit header records have name and value strings. Names must use token syntax; supported value code units are tab or 32–255 excluding DEL. Byte budgets use that single-byte representation, not UTF-8 or HTTP/2 compression.
- Every declared top-level input field is required and unexpected fields are rejected. Ordinary strings are limited to 8,192 UTF-16 code units and lists to 128 entries, with tighter operation-specific bounds where stated. JSON text has bounded nesting and node counts.
- Numeric outputs must be finite and no larger in absolute magnitude than the safe-integer limit; operations returning exact large integers use decimal text. Positions are zero-based and spans end exclusively unless the operation explicitly states a different convention.
Alternative or Complementary methods
Choose field-specific parsing and combination rules rather than applying one policy to every header. Preserve occurrence order and use a full HTTP implementation for message framing and protocol-level decisions.
References
-
RFC 9110: HTTP Semantics — RFC Editor
-
Tool behavior and example: HTTP Header Line First Colon Splitter — tool.io
Similar or alternative tools
- HTTP Header Top-Level Comma Token Splitter
Split HTTP comma lists with the existing quote/escape-aware scanner, not generic parentheses or CSS syntax; trims outer whitespace and preserves quoted text.
- HTTP Header List Combination Plan
Plan comma combination only for explicit caller-qualified list fields, always preserving Set-Cookie as uncombined; no universal field-combination inference.