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
- Enter names, pathLengths, creationOrders, requestedName. Keep parallel arrays aligned. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- 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 field | Meaning and units | Accepted input |
|---|---|---|
| names | Names | Required. Array of Text; maximum UTF-16 length 8192.; maximum items 256. |
| pathLengths | Path Lengths | Required. Array of Safe integer.; maximum items 256. |
| creationOrders | Creation Orders | Required. Array of Safe integer.; maximum items 256. |
| requestedName | Requested Name | Required. Text; maximum UTF-16 length 8192. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| selectedIndex | Zero-based selected source row, or minus one when no name matches. | Required. Safe integer. |
{
"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
Similar or alternative tools
- Cookie Path Prefix Boundary Flag
Check literal cookie path matching using equality and slash-boundary prefix rules.
- HTTP Date Precision Tie
Compare already-normalized whole-second HTTP date values, without parsing obsolete date formats.