Skip to content

Main content

HTTP Cookie Duplicate Path Tie Token Tool

Order eligible same-name cookies by longer supplied path then earlier creation; request applicability is supplied, not inferred.

Loading tool…

Description

Order eligible same-name cookies by longer supplied path then earlier creation; request applicability is supplied, not inferred.

Web protocol data has several layers: a complete message or URL, individual fields or components, and the literal tokens within them. Delimiter presence, spelling, comparison rules, and parser normalization can affect results. A check of one component needs its stated scope before it can be used in a larger parser or policy decision.

Order eligible same-name cookies by longer supplied path then earlier creation; request applicability is supplied, not inferred.

When to use this tool

Use HTTP Cookie Duplicate Path Tie Token when you need one stated URL, header, or protocol-component check in a diagnostic or parser workflow. Supply the input level specified below.

How to use the tool and how it works

  1. Enter names, pathLengths, creationOrders, requestedName. Keep parallel arrays aligned. 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 selectedIndex. Use the output convention below.

Require aligned names, pathLengths, and creationOrders, nonnegative lengths and orders, and distinct creation orders. Among entries matching requestedName exactly, choose greatest path length, breaking ties by lowest creation order; return selectedIndex or minus one when no entry matches.1

Input fieldMeaning and unitsAccepted input
namesNamesRequired. Array of Text; maximum UTF-16 length 8192.; maximum items 256.
pathLengthsPath LengthsRequired. Array of Safe integer.; maximum items 256.
creationOrdersCreation OrdersRequired. Array of Safe integer.; maximum items 256.
requestedNameRequested NameRequired. Text; maximum UTF-16 length 8192.
Output fieldInterpretationReturned shape
selectedIndexZero-based selected source row, or minus one when no name matches.Required. Safe integer.
json
{
  "input": {
    "names": [
      "id",
      "id",
      "other"
    ],
    "pathLengths": [
      1,
      4,
      8
    ],
    "creationOrders": [
      0,
      1,
      2
    ],
    "requestedName": "id"
  },
  "output": {
    "selectedIndex": 1
  }
}

Limitations and assumptions

  • Selection assumes the supplied candidates are already applicable. Domain matching, actual path strings, expiry, browser storage, and uniqueness of cookie names are not checked.
  • The field tables state structural bounds; the mechanics also specify cross-field constraints. Malformed inputs and unsupported domains cause errors. A successful false flag, empty branch value, or zero placeholder has the meaning stated above and is distinct from an input error.

Alternative or Complementary methods

Use a complete URL or header parser when the task involves an entire field or message. Test actual browser, server, or cache behavior separately when a security or protocol decision depends on more than this component.

References

  1. Calculation and input contract: web/http-cookie-duplicate-path-tie-token — tool.io

Similar or alternative tools