Skip to content

Main content

HTTP Quality Threshold Selector

Select positive explicit HTTP qualities at or above a supplied unit threshold; q=0 remains excluded even at threshold zero.

Loading tool…

Description

Select positive explicit HTTP qualities at or above a supplied unit threshold; q=0 remains excluded even at threshold zero.

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

Select positive explicit HTTP qualities at or above a supplied unit threshold; q=0 remains excluded even at threshold zero.

When to use this tool

Use this tool to select positive explicit HTTP qualities at or above a supplied unit threshold; q=0 remains excluded even at threshold zero.

How to use the tool and how it works

  1. Enter qualitiesJson, threshold using the field definitions below. For JSON text, serialize the explicit records in the shown shape.
  2. Run the operation. Correct input errors before interpreting an output.
  3. Read result.selected. Use the ordering, boundary rules and absence conditions described below.

Validate explicit token/q records and a threshold in [0,1]. Select records with q greater than zero and at least the threshold, retaining order.2

Input fieldMeaning and unitsAccepted input
qualitiesJsonJSON array of {token, q} records; q is from 0 through 1 in thousandth steps. Token uses HTTP token syntax.Text, at most 8,192 UTF-16 code units; the operation’s grammar also applies.
thresholdQuality threshold from 0 through 1; q = 0 remains excluded.A finite number satisfying the operation’s stated comparisons.

These are the decoded structures used in the example’s JSON text fields. Supply the corresponding serialized JSON strings as input.

json
{
  "qualitiesJson": [
    {
      "token": "a",
      "q": 0
    },
    {
      "token": "b",
      "q": 0.5
    },
    {
      "token": "c",
      "q": 1
    }
  ]
}
Output fieldInterpretation
resultObject containing the named fields below.
result.selectedPositive-quality records meeting the supplied threshold, in input order.
json
{
  "input": {
    "qualitiesJson": "[{\"token\":\"a\",\"q\":0},{\"token\":\"b\",\"q\":0.5},{\"token\":\"c\",\"q\":1}]",
    "threshold": 0.5
  },
  "output": {
    "result": {
      "selected": [
        {
          "token": "b",
          "q": 0.5
        },
        {
          "token": "c",
          "q": 1
        }
      ]
    }
  }
}

Limitations and assumptions

  • A zero threshold still excludes q = 0; no media-range precedence or header parsing occurs.
  • 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

  1. RFC 9110: HTTP Semantics — RFC Editor

  2. Tool behavior and example: HTTP Quality Threshold Selector — tool.io

Similar or alternative tools

  • HTTP Header Occurrence Selector

    Select all explicit HTTP header occurrences by a token-name bank under case-insensitive lookup, retaining source indexes and original spellings.

  • HTTP Quality Exclusion Partitioner

    Partition explicitly supplied token quality weights into q=0 exclusions and positive candidates; validates HTTP thousandth precision, no negotiation inference.