Skip to content

Main content

HTTP Range Unit Separator Token

Split one explicit HTTP Range field at its unit separator without validating or evaluating the range set.

Loading tool…

Description

Split a restricted HTTP range field at its first equals sign.

Text parsers operate on an explicit source grammar and boundary policy. Recognizing delimiters or removing one prefix is distinct from validating the surrounding document or protocol. Preserve whether an output represents raw source spelling or decoded text, especially where quoted empty values, ASCII escapes, case and whitespace affect interpretation.

Split a restricted HTTP range field at its first equals sign.

When to use this tool

Use HTTP Range Unit Separator Token when you already have headerValue and need to split a restricted HTTP range field at its first equals sign.

How to use the tool and how it works

  1. Enter headerValue. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read unitToken, rangeSetText. Use the output convention below.

Require a nonempty ASCII HTTP-token unit, nonempty remainder and no CR/LF. Return unitToken and the unchanged remainder after the first =.1

HTTP range syntax combines a token unit and a range set. Splitting at the separator does not validate the unit-specific ranges or their satisfiability.2

Input fieldMeaning and unitsAccepted input
headerValueHeader ValueRequired. Text; maximum UTF-16 length 8192.
Output fieldInterpretationReturned shape
unitTokenUnit TokenRequired. Text; maximum UTF-16 length 8192.
rangeSetTextUnparsed nonempty suffix after the first =; extra equals signs are preserved.Required. Text; maximum UTF-16 length 8192.
json
{
  "input": {
    "headerValue": "bytes=0-99"
  },
  "output": {
    "unitToken": "bytes",
    "rangeSetText": "0-99"
  }
}

Limitations and assumptions

  • The range set is not parsed; numeric ranges, additional equals signs, unit registration, request semantics and satisfiability are not validated.
  • 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 parser for the complete intended grammar and dialect when document validity matters. Keep source spelling, decoded values, quote/escape context and whitespace rules explicit; these helpers intentionally operate on one delimiter, prefix, field or protocol component.

References

  1. Calculation and input contract: parse/http-range-unit-separator-token — tool.io

  2. RFC 9110: Range units and specifiers — IETF

Similar or alternative tools