From a47c6564ab467c4e4bd5c53718f7da2e07bb96ed Mon Sep 17 00:00:00 2001 From: Diego Resendez Date: Sat, 10 Oct 2026 17:27:11 -0500 Subject: [PATCH] test(router): add owner-requested parity cases and a shared-prefix generator Additions requested in CARD-08 review, captured from ed47836 like the rest of the corpus and frozen in their own files, so the first capture is untouched. - Backtracking: a static branch failing one level down, at depth 5 (and a param branch at depth 3), and with a constrained param on the fallback. - Cross-pattern Allow: GET :id plus POST b, with and without DELETE :rest*, at matcher level and through app.fetch and Node. - Encoded slashes in plain and constrained params. A constraint cannot itself contain a slash: the pattern splits there and is rejected as malformed. - Zero-segment catch-alls without an exact sibling, and a root catch-all. - The mesh HTTP table across a peer's lifetime. It is built once at boot and never changes: a peer that leaves keeps its routes (503 on hit, 405 Allow unchanged) and a peer that arrives after boot is never spliced in (404). CARD-10 can reuse this for its no-rebuild-per-request check. - router-parity-gen-v2, same seed 10908, forces static, param, constrained and catch-all siblings under shared prefixes at depths 1-4. branches.ts measures the effect and the result is frozen with the fixture: 71.9% of v2 requests reach sibling branches and 67.3% backtrack, against 36.5% and 26.7% for v1. v1 and its fixture are unchanged. Refs #109 Signed-off-by: Diego Resendez --- test/router-parity/README.md | 4 +- test/router-parity/branches.ts | 94 + test/router-parity/cases.ts | 90 + .../frozen/matcher-generated-v2.json | 9808 +++++++++++++++++ test/router-parity/frozen/matcher-owner.json | 1190 ++ .../router-parity/frozen/owner-app-allow.json | 165 + .../frozen/owner-mesh-lifetime.json | 133 + test/router-parity/generator.ts | 90 + test/router-parity/matcher.test.ts | 60 +- test/router-parity/owner.test.ts | 204 + 10 files changed, 11835 insertions(+), 3 deletions(-) create mode 100644 test/router-parity/branches.ts create mode 100644 test/router-parity/frozen/matcher-generated-v2.json create mode 100644 test/router-parity/frozen/matcher-owner.json create mode 100644 test/router-parity/frozen/owner-app-allow.json create mode 100644 test/router-parity/frozen/owner-mesh-lifetime.json create mode 100644 test/router-parity/owner.test.ts diff --git a/test/router-parity/README.md b/test/router-parity/README.md index e28b709..86fae1e 100644 --- a/test/router-parity/README.md +++ b/test/router-parity/README.md @@ -26,10 +26,12 @@ Nothing can regenerate the baseline by accident: |---|---| | `manifest.json` | Existing tests retained unchanged (ROUTER-CORPUS §1), with the verification result at the pinned revision. `manifest.test.ts` fails if a named file or test disappears. | | `oracle.ts` | Verbatim copy of the pre-radix `matchRoute`, `resolveRoute`, `allowedMethods`, `normalizeRequestPath`, `compilePattern` and `matchWsRoute`. Test-only; `src/` must never import it. | -| `cases.ts`, `generator.ts` | Matcher inputs: 24 hand-picked scenarios (§2), and a fixed-seed generator (`router-parity-gen-v1`, seed `10908`). | +| `cases.ts`, `generator.ts` | Matcher inputs: 24 hand-picked scenarios (§2), 9 owner-requested scenarios (backtracking, cross-pattern `Allow`, encoded slashes, zero-segment catch-alls), and a fixed-seed generator in two versions, both seed `10908`: `router-parity-gen-v1`, and `router-parity-gen-v2`, which forces static/param/constrained/catch-all siblings under shared prefixes. | +| `branches.ts` | Measures the share of generated requests that walk into sibling branches and backtrack; frozen with the v2 fixture. | | `frozen/matcher-*.json` | Captured matcher outputs: declaration ID, decoded params, `implicitHead`, ordered `Allow`, or the normalization error. The generated file also stores the seed, the generator rules and every generated input. | | `frozen/app-*.json` | Status, headers, `Allow` and body through `app.fetch` and through a Node socket, including HEAD body suppression. | | `frozen/ws-*.json` | WS upgrade selection through `app.upgrade` and the Node listener, plus HTTP requests at the WS paths. | +| `frozen/owner-*.json` | Owner additions needing a running app: cross-pattern `Allow` through both adapters, and the mesh HTTP route table across a peer's lifetime (it is built once at boot and never changes — see `owner.test.ts`). | | `frozen/boot-*.json` | Boot-time rejections: pattern compilation, local ambiguity, mesh splicing. | | `frozen/golden-*.json` | `graph()`, `explain()`, `openapi({ title: 'Parity', version: '1' })`, and a mesh teacup before and after `ready()`. | diff --git a/test/router-parity/branches.ts b/test/router-parity/branches.ts new file mode 100644 index 0000000..89a2df7 --- /dev/null +++ b/test/router-parity/branches.ts @@ -0,0 +1,94 @@ +/** + * Measures how much of a corpus exercises sibling branches, so "the generator covers backtracking" + * is a number rather than a hope. Method-agnostic: a tree is walked by path before a method is + * chosen, so any declaration that shares the walk counts. + * + * - sibling hit: two declarations both match the request's leading segments through a segment + * where their patterns differ — the lookup has two branches to choose between at that point. + * - backtrack: a sibling hit where at least one of those declarations then fails to match the + * whole path — a branch the lookup walks into and has to leave. + */ +import { compilePattern, normalizeRequestPath, type CompiledSegment } from './oracle'; +import type { Scenario } from './matcher'; + +function segmentMatches(segment: CompiledSegment, value: string): boolean { + if (segment.kind === 'static') return segment.value === value; + if (segment.kind === 'catchAll') return true; + const decoded = value.includes('%') ? decodeURIComponent(value) : value; + return !segment.constraint || segment.constraint.test(decoded); +} + +/** Leading segments matched, and whether the whole path matched. */ +function walk(pattern: string, segs: string[]): { depth: number; full: boolean } { + const { segments } = compilePattern(pattern); + for (let i = 0; i < segments.length; i++) { + if (segments[i].kind === 'catchAll') return { depth: segments.length, full: true }; + if (i >= segs.length || !segmentMatches(segments[i], segs[i])) return { depth: i, full: false }; + } + return { depth: segments.length, full: segments.length === segs.length }; +} + +const sameSegment = (a: CompiledSegment, b: CompiledSegment): boolean => + JSON.stringify({ ...a, constraint: undefined }) === JSON.stringify({ ...b, constraint: undefined }); + +export interface BranchStats { + requests: number; + validPaths: number; + siblingHits: number; + backtracks: number; + siblingShare: string; + backtrackShare: string; +} + +export function branchStats(scenarios: Scenario[]): BranchStats { + let requests = 0; + let validPaths = 0; + let siblingHits = 0; + let backtracks = 0; + + for (const scenario of scenarios) { + const patterns = [...new Set(scenario.declarations.map((d) => d.pattern))]; + + for (const { raw } of scenario.requests) { + requests++; + let path: string; + try { + path = normalizeRequestPath(raw); + } catch { + continue; + } + validPaths++; + + const segs = path.split('/').filter(Boolean); + const walks = patterns.map((pattern) => ({ segments: compilePattern(pattern).segments, ...walk(pattern, segs) })); + let sibling = false; + let backtrack = false; + + for (let i = 0; i < walks.length; i++) { + for (let j = i + 1; j < walks.length; j++) { + const [a, b] = [walks[i], walks[j]]; + const shared = Math.min(a.depth, b.depth, a.segments.length, b.segments.length); + const diverge = Array.from({ length: shared }, (_, d) => d).find( + (d) => !sameSegment(a.segments[d], b.segments[d]), + ); + if (diverge === undefined) continue; + sibling = true; + if (!a.full || !b.full) backtrack = true; + } + } + + if (sibling) siblingHits++; + if (backtrack) backtracks++; + } + } + + const pct = (n: number) => `${((n / requests) * 100).toFixed(1)}%`; + return { + requests, + validPaths, + siblingHits, + backtracks, + siblingShare: pct(siblingHits), + backtrackShare: pct(backtracks), + }; +} diff --git a/test/router-parity/cases.ts b/test/router-parity/cases.ts index 27dd50d..bae434b 100644 --- a/test/router-parity/cases.ts +++ b/test/router-parity/cases.ts @@ -250,3 +250,93 @@ export const HAND_SCENARIOS: Scenario[] = [ get('/v/1/x', '/v/a/x', '/v/1', '/v'), ), ]; + +/** + * Owner-requested additions (CARD-08 review), frozen separately in `frozen/matcher-owner.json` so the + * first capture stays untouched. Inputs only, like everything above. + */ +export const OWNER_SCENARIOS: Scenario[] = [ + scenario( + 'O01-backtrack', + 'a static branch that fails one level down must fall back to a sibling param branch', + [ + ['static', 'GET', '/a/b/c'], + ['param', 'GET', '/a/:x/d'], + ], + get('/a/b/d', '/a/b/c', '/a/z/d', '/a/b/x'), + ), + scenario( + 'O02-backtrack-deep', + 'the static branch fails at depth 5 (and a param branch at depth 3), after walking four or two levels', + [ + ['static', 'GET', '/p/q/r/s/t'], + ['paramDepth2', 'GET', '/p/:x/r/s/u'], + ['paramDepth3', 'GET', '/p/q/:y/s/v'], + ], + get('/p/q/r/s/u', '/p/q/r/s/t', '/p/z/r/s/u', '/p/q/r/s/v', '/p/q/z/s/v', '/p/q/r/s/w'), + ), + scenario( + 'O03-backtrack-constrained', + 'the fallback branch is a constrained param', + [ + ['static', 'GET', '/k/1/c'], + ['digits', 'GET', '/k/:n(\\d+)/d'], + ], + get('/k/1/d', '/k/1/c', '/k/2/d', '/k/x/d'), + ), + scenario( + 'O04-cross-pattern-allow', + 'Allow is the union of methods across different patterns matching the same path', + [ + ['getParam', 'GET', '/a/:id'], + ['postStatic', 'POST', '/a/b'], + ], + [ + ['PUT', '/a/b'], + ['OPTIONS', '/a/b'], + ['PUT', '/a/x'], + ['HEAD', '/a/b'], + ['GET', '/a/b'], + ['POST', '/a/x'], + ], + ), + scenario( + 'O05-cross-pattern-allow-catch-all', + 'the same, with a catch-all contributing a method', + [ + ['getParam', 'GET', '/a/:id'], + ['postStatic', 'POST', '/a/b'], + ['deleteRest', 'DELETE', '/a/:rest*'], + ], + [ + ['PUT', '/a/b'], + ['OPTIONS', '/a/b'], + ['PUT', '/a/x'], + ['HEAD', '/a/b'], + ['PUT', '/a/x/y'], + ['DELETE', '/a'], + ], + ), + scenario( + 'O06-encoded-slash-plain', + 'an encoded slash inside one segment, plain param', + [['userId', 'GET', '/users/:id']], + get('/users/a%2Fb', '/users/a%2fb', '/users/%2F', '/users/a/b'), + ), + scenario( + 'O07-encoded-slash-constrained', + 'an encoded slash against a word constraint and a non-space constraint (a / cannot appear inside a constraint: the pattern splits there)', + [ + ['word', 'GET', '/c/:id(\\w+)'], + ['nonSpace', 'GET', '/d/:id(\\S+)'], + ], + get('/c/a%2Fb', '/c/ab', '/d/a%2Fb', '/d/a%2fb', '/d/%2F', '/d/a/b'), + ), + scenario( + 'O08-zero-segment-catch-all', + 'a catch-all with no exact sibling route', + [['rest', 'GET', '/files/:rest*']], + [...get('/files', '/files/', '/files/a', '/filesx'), ['HEAD', '/files'], ['OPTIONS', '/files']], + ), + scenario('O09-root-catch-all', 'a root catch-all alone', [['rest', 'GET', '/:rest*']], get('/', '/a', '/a/b/')), +]; diff --git a/test/router-parity/frozen/matcher-generated-v2.json b/test/router-parity/frozen/matcher-generated-v2.json new file mode 100644 index 0000000..87b8253 --- /dev/null +++ b/test/router-parity/frozen/matcher-generated-v2.json @@ -0,0 +1,9808 @@ +{ + "revision": "ed47836c9820c47bf4ed5e902d91e019abdb110a", + "data": { + "generator": "router-parity-gen-v2", + "seed": 10908, + "rules": [ + "PRNG: mulberry32(seed), fresh for v2; every choice below draws from it in program order.", + "40 scenarios; each has a shared static prefix of 0-3 segments (a|b|c|x), so siblings sit at depth 1-4.", + "Each scenario has 3-6 sibling declarations: prefix + one sibling segment + a tail. The first sibling segment is static, the second a plain or constrained param; the rest are static (p=0.35), plain (p=0.25), constrained (p=0.25) or a final catch-all (p=0.15). Tails are 0-2 segments, static/plain/constrained, none after a catch-all.", + "Then 0-3 unrelated declarations made by the v1 declaration rule.", + "Methods and transports follow the v1 declaration rule.", + "Requests (12): p=0.5 instantiate a sibling; p=0.25 cross two siblings (prefix and sibling segment of one, tail of another) to force a partial match; else prefix + 0-3 pool values. v1 decoration and request methods apply.", + "Unsupported patterns are never produced: every generated pattern must pass compilePattern." + ], + "branchStats": { + "v1": { + "requests": 480, + "validPaths": 459, + "siblingHits": 175, + "backtracks": 128, + "siblingShare": "36.5%", + "backtrackShare": "26.7%" + }, + "v2": { + "requests": 480, + "validPaths": 459, + "siblingHits": 345, + "backtracks": 323, + "siblingShare": "71.9%", + "backtrackShare": "67.3%" + } + }, + "scenarios": [ + { + "id": "S01", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /x", + "declarations": [ + { + "id": "S01.s1", + "method": "DELETE", + "pattern": "/x/x/x", + "transport": "buffer" + }, + { + "id": "S01.s2", + "method": "GET", + "pattern": "/x/:p1([0-9a-f]{2})/c/x", + "transport": "buffer" + }, + { + "id": "S01.s3", + "method": "GET", + "pattern": "/x/:p1", + "transport": "ndjson" + }, + { + "id": "S01.s4", + "method": "GET", + "pattern": "/x/:p1/:p2([a-c]+)", + "transport": "buffer" + }, + { + "id": "S01.s5", + "method": "PATCH", + "pattern": "/x/x", + "transport": "buffer" + }, + { + "id": "S01.s6", + "method": "POST", + "pattern": "/x/:p1*", + "transport": "buffer" + }, + { + "id": "S01.u1", + "method": "HEAD", + "pattern": "/:p0*", + "transport": "buffer" + }, + { + "id": "S01.u2", + "method": "GET", + "pattern": "/:p0", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "PUT", + "raw": "/x/7/" + }, + { + "method": "POST", + "raw": "/x/%34%32/7" + }, + { + "method": "DELETE", + "raw": "/x/c/x" + }, + { + "method": "PATCH", + "raw": "/x" + }, + { + "method": "POST", + "raw": "/x/x" + }, + { + "method": "OPTIONS", + "raw": "/x/c" + }, + { + "method": "GET", + "raw": "/x" + }, + { + "method": "DELETE", + "raw": "/x/0a" + }, + { + "method": "HEAD", + "raw": "/x/0a/7" + }, + { + "method": "PATCH", + "raw": "/x/x" + }, + { + "method": "PUT", + "raw": "/x/ff/" + }, + { + "method": "GET", + "raw": "/x/7" + } + ], + "outcomes": [ + { + "method": "PUT", + "raw": "/x/7/", + "normalized": "/x/7", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/x/%34%32/7", + "normalized": "/x/%34%32/7", + "match": { + "id": "S01.s6", + "params": { + "p1": "42/7" + } + }, + "resolve": { + "id": "S01.s6", + "params": { + "p1": "42/7" + }, + "implicitHead": false + }, + "allow": [ + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/x/c/x", + "normalized": "/x/c/x", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/x", + "normalized": "/x", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/x/x", + "normalized": "/x/x", + "match": { + "id": "S01.s6", + "params": { + "p1": "x" + } + }, + "resolve": { + "id": "S01.s6", + "params": { + "p1": "x" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "POST", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/x/c", + "normalized": "/x/c", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/x", + "normalized": "/x", + "match": { + "id": "S01.u2", + "params": { + "p0": "x" + } + }, + "resolve": { + "id": "S01.u2", + "params": { + "p0": "x" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/x/0a", + "normalized": "/x/0a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/x/0a/7", + "normalized": "/x/0a/7", + "match": { + "id": "S01.u1", + "params": { + "p0": "x/0a/7" + } + }, + "resolve": { + "id": "S01.u1", + "params": { + "p0": "x/0a/7" + }, + "implicitHead": false + }, + "allow": [ + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/x/x", + "normalized": "/x/x", + "match": { + "id": "S01.s5", + "params": {} + }, + "resolve": { + "id": "S01.s5", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "POST", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/x/ff/", + "normalized": "/x/ff", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/x/7", + "normalized": "/x/7", + "match": { + "id": "S01.s3", + "params": { + "p1": "7" + } + }, + "resolve": { + "id": "S01.s3", + "params": { + "p1": "7" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "POST", + "OPTIONS" + ] + } + ] + }, + { + "id": "S02", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /c/x/x", + "declarations": [ + { + "id": "S02.s1", + "method": "GET", + "pattern": "/c/x/x/a/x/x", + "transport": "buffer" + }, + { + "id": "S02.s2", + "method": "PATCH", + "pattern": "/c/x/x/:p3/:p4", + "transport": "buffer" + }, + { + "id": "S02.s3", + "method": "HEAD", + "pattern": "/c/x/x/:p3*", + "transport": "buffer" + }, + { + "id": "S02.s4", + "method": "GET", + "pattern": "/c/x/x/:p3", + "transport": "buffer" + }, + { + "id": "S02.s5", + "method": "GET", + "pattern": "/c/x/x/c", + "transport": "buffer" + }, + { + "id": "S02.s6", + "method": "GET", + "pattern": "/c/x/x/:p3", + "transport": "buffer" + }, + { + "id": "S02.u1", + "method": "OPTIONS", + "pattern": "/", + "transport": "buffer" + }, + { + "id": "S02.u2", + "method": "GET", + "pattern": "/a/:p1/:p2([0-9a-f]{2})", + "transport": "buffer" + }, + { + "id": "S02.u3", + "method": "POST", + "pattern": "/:p0([0-9a-f]{2})/a/b", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/c/x/x/b" + }, + { + "method": "POST", + "raw": "/c/x/x" + }, + { + "method": "POST", + "raw": "/c/x/x/%34%32" + }, + { + "method": "GET", + "raw": "/c/x/x/a/x/x" + }, + { + "method": "GET", + "raw": "/c/x/x/a/." + }, + { + "method": "OPTIONS", + "raw": "/c/x/x/0a/a%20b" + }, + { + "method": "GET", + "raw": "/c/x/x/c" + }, + { + "method": "POST", + "raw": "/c/x/x/caf%C3%A9/42" + }, + { + "method": "DELETE", + "raw": "/c/x/x/q/../0a/7" + }, + { + "method": "POST", + "raw": "/c/x/x/a%20b/caf%C3%A9" + }, + { + "method": "PATCH", + "raw": "/c/x/x" + }, + { + "method": "POST", + "raw": "/c/x/x/ff" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/c/x/x/b", + "normalized": "/c/x/x/b", + "match": { + "id": "S02.s4", + "params": { + "p3": "b" + } + }, + "resolve": { + "id": "S02.s4", + "params": { + "p3": "b" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/c/x/x", + "normalized": "/c/x/x", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/c/x/x/%34%32", + "normalized": "/c/x/x/%34%32", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/c/x/x/a/x/x", + "normalized": "/c/x/x/a/x/x", + "match": { + "id": "S02.s1", + "params": {} + }, + "resolve": { + "id": "S02.s1", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/c/x/x/a/.", + "normalized": "/c/x/x/a", + "match": { + "id": "S02.s4", + "params": { + "p3": "a" + } + }, + "resolve": { + "id": "S02.s4", + "params": { + "p3": "a" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/c/x/x/0a/a%20b", + "normalized": "/c/x/x/0a/a%20b", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/c/x/x/c", + "normalized": "/c/x/x/c", + "match": { + "id": "S02.s5", + "params": {} + }, + "resolve": { + "id": "S02.s5", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/c/x/x/caf%C3%A9/42", + "normalized": "/c/x/x/caf%C3%A9/42", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/c/x/x/q/../0a/7", + "normalized": "/c/x/x/0a/7", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/c/x/x/a%20b/caf%C3%A9", + "normalized": "/c/x/x/a%20b/caf%C3%A9", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/c/x/x", + "normalized": "/c/x/x", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/c/x/x/ff", + "normalized": "/c/x/x/ff", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + } + ] + }, + { + "id": "S03", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /a", + "declarations": [ + { + "id": "S03.s1", + "method": "GET", + "pattern": "/a/c/:p2(\\d+)/:p3(\\d+)", + "transport": "ndjson" + }, + { + "id": "S03.s2", + "method": "PUT", + "pattern": "/a/:p1/:p2/:p3([a-c]+)", + "transport": "buffer" + }, + { + "id": "S03.s3", + "method": "GET", + "pattern": "/a/:p1", + "transport": "buffer" + }, + { + "id": "S03.s4", + "method": "GET", + "pattern": "/a/:p1*", + "transport": "ndjson" + }, + { + "id": "S03.u1", + "method": "GET", + "pattern": "/c/b/:p2*", + "transport": "buffer" + }, + { + "id": "S03.u2", + "method": "GET", + "pattern": "/", + "transport": "sse" + }, + { + "id": "S03.u3", + "method": "GET", + "pattern": "/c/b/:p2([0-9a-f]{2})", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/a/c/a/a%20b" + }, + { + "method": "PATCH", + "raw": "/a/a" + }, + { + "method": "PUT", + "raw": "/a/c/caf%C3%A9/a%20b" + }, + { + "method": "PUT", + "raw": "/a" + }, + { + "method": "PATCH", + "raw": "/a" + }, + { + "method": "DELETE", + "raw": "/a/c" + }, + { + "method": "HEAD", + "raw": "/a/c/7/ff" + }, + { + "method": "POST", + "raw": "/a/ff/caf%C3%A9/" + }, + { + "method": "PATCH", + "raw": "/a/a%20b/x" + }, + { + "method": "DELETE", + "raw": "/a/42/a%20b/42" + }, + { + "method": "PUT", + "raw": "/a/x" + }, + { + "method": "PATCH", + "raw": "/q/../a/0a" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/a/c/a/a%20b", + "normalized": "/a/c/a/a%20b", + "match": { + "id": "S03.s4", + "params": { + "p1": "c/a/a b" + } + }, + "resolve": { + "id": "S03.s4", + "params": { + "p1": "c/a/a b" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/a/a", + "normalized": "/a/a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/a/c/caf%C3%A9/a%20b", + "normalized": "/a/c/caf%C3%A9/a%20b", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/a", + "normalized": "/a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/a", + "normalized": "/a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/a/c", + "normalized": "/a/c", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/a/c/7/ff", + "normalized": "/a/c/7/ff", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/a/ff/caf%C3%A9/", + "normalized": "/a/ff/caf%C3%A9", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/a/a%20b/x", + "normalized": "/a/a%20b/x", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/a/42/a%20b/42", + "normalized": "/a/42/a%20b/42", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/a/x", + "normalized": "/a/x", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/q/../a/0a", + "normalized": "/a/0a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + } + ] + }, + { + "id": "S04", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /", + "declarations": [ + { + "id": "S04.s1", + "method": "HEAD", + "pattern": "/c/x/x", + "transport": "buffer" + }, + { + "id": "S04.s2", + "method": "POST", + "pattern": "/:p0([a-c]+)/b/:p2", + "transport": "buffer" + }, + { + "id": "S04.s3", + "method": "PATCH", + "pattern": "/:p0", + "transport": "buffer" + }, + { + "id": "S04.u1", + "method": "OPTIONS", + "pattern": "/:p0", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "PATCH", + "raw": "/c" + }, + { + "method": "OPTIONS", + "raw": "/c/b/b" + }, + { + "method": "HEAD", + "raw": "/b/b/0a" + }, + { + "method": "GET", + "raw": "/ff" + }, + { + "method": "DELETE", + "raw": "/c" + }, + { + "method": "PUT", + "raw": "/42/x/x" + }, + { + "method": "GET", + "raw": "/c/x/x" + }, + { + "method": "PUT", + "raw": "/a%20b" + }, + { + "method": "HEAD", + "raw": "/c/x/x" + }, + { + "method": "HEAD", + "raw": "/7/q/.." + }, + { + "method": "GET", + "raw": "/c/x/x" + }, + { + "method": "DELETE", + "raw": "/42" + } + ], + "outcomes": [ + { + "method": "PATCH", + "raw": "/c", + "normalized": "/c", + "match": { + "id": "S04.s3", + "params": { + "p0": "c" + } + }, + "resolve": { + "id": "S04.s3", + "params": { + "p0": "c" + }, + "implicitHead": false + }, + "allow": [ + "PATCH", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/c/b/b", + "normalized": "/c/b/b", + "match": null, + "resolve": null, + "allow": [ + "POST", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/b/b/0a", + "normalized": "/b/b/0a", + "match": null, + "resolve": null, + "allow": [ + "POST", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/ff", + "normalized": "/ff", + "match": null, + "resolve": null, + "allow": [ + "PATCH", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/c", + "normalized": "/c", + "match": null, + "resolve": null, + "allow": [ + "PATCH", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/42/x/x", + "normalized": "/42/x/x", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "GET", + "raw": "/c/x/x", + "normalized": "/c/x/x", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/a%20b", + "normalized": "/a%20b", + "match": null, + "resolve": null, + "allow": [ + "PATCH", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/c/x/x", + "normalized": "/c/x/x", + "match": { + "id": "S04.s1", + "params": {} + }, + "resolve": { + "id": "S04.s1", + "params": {}, + "implicitHead": false + }, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/7/q/..", + "normalized": "/7", + "match": null, + "resolve": null, + "allow": [ + "PATCH", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/c/x/x", + "normalized": "/c/x/x", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/42", + "normalized": "/42", + "match": null, + "resolve": null, + "allow": [ + "PATCH", + "OPTIONS" + ] + } + ] + }, + { + "id": "S05", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /a/c", + "declarations": [ + { + "id": "S05.s1", + "method": "PUT", + "pattern": "/a/c/b/b", + "transport": "buffer" + }, + { + "id": "S05.s2", + "method": "GET", + "pattern": "/a/c/:p2", + "transport": "buffer" + }, + { + "id": "S05.s3", + "method": "OPTIONS", + "pattern": "/a/c/a/:p3", + "transport": "buffer" + }, + { + "id": "S05.s4", + "method": "OPTIONS", + "pattern": "/a/c/a/:p3([0-9a-f]{2})", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "DELETE", + "raw": "/a/c/ff/b" + }, + { + "method": "PUT", + "raw": "/a/c/a/a" + }, + { + "method": "POST", + "raw": "/a/c/x" + }, + { + "method": "OPTIONS", + "raw": "/a/c/b" + }, + { + "method": "PATCH", + "raw": "/a/c/a/b" + }, + { + "method": "HEAD", + "raw": "/a/c/" + }, + { + "method": "GET", + "raw": "/a/c" + }, + { + "method": "PUT", + "raw": "/a/c/a/%34%32" + }, + { + "method": "PATCH", + "raw": "/a/c/./b/a%20b/ff" + }, + { + "method": "PUT", + "raw": "/a/c/0a/ff/caf%C3%A9" + }, + { + "method": "OPTIONS", + "raw": "/a/c/b/b/" + }, + { + "method": "GET", + "raw": "/a/c/b/b" + } + ], + "outcomes": [ + { + "method": "DELETE", + "raw": "/a/c/ff/b", + "normalized": "/a/c/ff/b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PUT", + "raw": "/a/c/a/a", + "normalized": "/a/c/a/a", + "match": null, + "resolve": null, + "allow": [ + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/a/c/x", + "normalized": "/a/c/x", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/a/c/b", + "normalized": "/a/c/b", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/a/c/a/b", + "normalized": "/a/c/a/b", + "match": null, + "resolve": null, + "allow": [ + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/a/c/", + "normalized": "/a/c", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "GET", + "raw": "/a/c", + "normalized": "/a/c", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PUT", + "raw": "/a/c/a/%34%32", + "normalized": "/a/c/a/%34%32", + "match": null, + "resolve": null, + "allow": [ + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/a/c/./b/a%20b/ff", + "normalized": "/a/c/b/a%20b/ff", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PUT", + "raw": "/a/c/0a/ff/caf%C3%A9", + "normalized": "/a/c/0a/ff/caf%C3%A9", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "OPTIONS", + "raw": "/a/c/b/b/", + "normalized": "/a/c/b/b", + "match": null, + "resolve": null, + "allow": [ + "PUT", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/a/c/b/b", + "normalized": "/a/c/b/b", + "match": null, + "resolve": null, + "allow": [ + "PUT", + "OPTIONS" + ] + } + ] + }, + { + "id": "S06", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /b", + "declarations": [ + { + "id": "S06.s1", + "method": "POST", + "pattern": "/b/b/x", + "transport": "buffer" + }, + { + "id": "S06.s2", + "method": "POST", + "pattern": "/b/:p1(\\d+)/:p2/:p3(\\d+)", + "transport": "buffer" + }, + { + "id": "S06.s3", + "method": "PUT", + "pattern": "/b/c", + "transport": "buffer" + }, + { + "id": "S06.s4", + "method": "PATCH", + "pattern": "/b/x", + "transport": "buffer" + }, + { + "id": "S06.u1", + "method": "OPTIONS", + "pattern": "/b/:p1([0-9a-f]{2})", + "transport": "buffer" + }, + { + "id": "S06.u2", + "method": "DELETE", + "pattern": "/x/x", + "transport": "buffer" + }, + { + "id": "S06.u3", + "method": "GET", + "pattern": "/:p0/:p1([a-c]+)", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "POST", + "raw": "/b/./x" + }, + { + "method": "GET", + "raw": "/b/c" + }, + { + "method": "POST", + "raw": "/b/b/a/a" + }, + { + "method": "DELETE", + "raw": "/b/7/b" + }, + { + "method": "DELETE", + "raw": "/b" + }, + { + "method": "POST", + "raw": "/b/c/x/a%20b" + }, + { + "method": "DELETE", + "raw": "/b/c" + }, + { + "method": "HEAD", + "raw": "/b/42/c/ff" + }, + { + "method": "OPTIONS", + "raw": "/b/b/caf%C3%A9/q/../0a" + }, + { + "method": "OPTIONS", + "raw": "/b/" + }, + { + "method": "POST", + "raw": "/b/b/x" + }, + { + "method": "POST", + "raw": "/b/ff/0a/0a" + } + ], + "outcomes": [ + { + "method": "POST", + "raw": "/b/./x", + "normalized": "/b/x", + "match": null, + "resolve": null, + "allow": [ + "PATCH", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/b/c", + "normalized": "/b/c", + "match": { + "id": "S06.u3", + "params": { + "p0": "b", + "p1": "c" + } + }, + "resolve": { + "id": "S06.u3", + "params": { + "p0": "b", + "p1": "c" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "PUT", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/b/b/a/a", + "normalized": "/b/b/a/a", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "DELETE", + "raw": "/b/7/b", + "normalized": "/b/7/b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "DELETE", + "raw": "/b", + "normalized": "/b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "POST", + "raw": "/b/c/x/a%20b", + "normalized": "/b/c/x/a%20b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "DELETE", + "raw": "/b/c", + "normalized": "/b/c", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "PUT", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/b/42/c/ff", + "normalized": "/b/42/c/ff", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "OPTIONS", + "raw": "/b/b/caf%C3%A9/q/../0a", + "normalized": "/b/b/caf%C3%A9/0a", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "OPTIONS", + "raw": "/b/", + "normalized": "/b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "POST", + "raw": "/b/b/x", + "normalized": "/b/b/x", + "match": { + "id": "S06.s1", + "params": {} + }, + "resolve": { + "id": "S06.s1", + "params": {}, + "implicitHead": false + }, + "allow": [ + "POST", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/b/ff/0a/0a", + "normalized": "/b/ff/0a/0a", + "match": null, + "resolve": null, + "allow": [] + } + ] + }, + { + "id": "S07", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /c", + "declarations": [ + { + "id": "S07.s1", + "method": "HEAD", + "pattern": "/c/c/b/:p3", + "transport": "buffer" + }, + { + "id": "S07.s2", + "method": "GET", + "pattern": "/c/:p1([0-9a-f]{2})", + "transport": "sse" + }, + { + "id": "S07.s3", + "method": "DELETE", + "pattern": "/c/a/c", + "transport": "buffer" + }, + { + "id": "S07.s4", + "method": "PATCH", + "pattern": "/c/:p1(\\d+)/:p2([0-9a-f]{2})/x", + "transport": "buffer" + }, + { + "id": "S07.u1", + "method": "GET", + "pattern": "/:p0(\\d+)", + "transport": "buffer" + }, + { + "id": "S07.u2", + "method": "HEAD", + "pattern": "/:p0([a-c]+)/:p1*", + "transport": "buffer" + }, + { + "id": "S07.u3", + "method": "PUT", + "pattern": "/:p0/x/c", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "PUT", + "raw": "/c/a/a" + }, + { + "method": "GET", + "raw": "/c/a/c" + }, + { + "method": "PUT", + "raw": "/c/a/c" + }, + { + "method": "PUT", + "raw": "/c/c/ff/x" + }, + { + "method": "POST", + "raw": "/c/ff/c" + }, + { + "method": "GET", + "raw": "/c/0a/0a/x/" + }, + { + "method": "PATCH", + "raw": "/c/b/x/x" + }, + { + "method": "PATCH", + "raw": "/c/7/c" + }, + { + "method": "PUT", + "raw": "/c/a%20b/a%20b/" + }, + { + "method": "DELETE", + "raw": "/c/b" + }, + { + "method": "GET", + "raw": "/c/caf%C3%A9" + }, + { + "method": "HEAD", + "raw": "/c/b" + } + ], + "outcomes": [ + { + "method": "PUT", + "raw": "/c/a/a", + "normalized": "/c/a/a", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/c/a/c", + "normalized": "/c/a/c", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/c/a/c", + "normalized": "/c/a/c", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/c/c/ff/x", + "normalized": "/c/c/ff/x", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/c/ff/c", + "normalized": "/c/ff/c", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/c/0a/0a/x/", + "normalized": "/c/0a/0a/x", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/c/b/x/x", + "normalized": "/c/b/x/x", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/c/7/c", + "normalized": "/c/7/c", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/c/a%20b/a%20b/", + "normalized": "/c/a%20b/a%20b", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/c/b", + "normalized": "/c/b", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/c/caf%C3%A9", + "normalized": "/c/caf%C3%A9", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/c/b", + "normalized": "/c/b", + "match": { + "id": "S07.u2", + "params": { + "p0": "c", + "p1": "b" + } + }, + "resolve": { + "id": "S07.u2", + "params": { + "p0": "c", + "p1": "b" + }, + "implicitHead": false + }, + "allow": [ + "HEAD", + "OPTIONS" + ] + } + ] + }, + { + "id": "S08", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /x/x/c", + "declarations": [ + { + "id": "S08.s1", + "method": "PUT", + "pattern": "/x/x/c/c/x/x", + "transport": "buffer" + }, + { + "id": "S08.s2", + "method": "HEAD", + "pattern": "/x/x/c/:p3/c", + "transport": "buffer" + }, + { + "id": "S08.s3", + "method": "PATCH", + "pattern": "/x/x/c/:p3/:p4(\\d+)", + "transport": "buffer" + }, + { + "id": "S08.s4", + "method": "POST", + "pattern": "/x/x/c/c/:p4([a-c]+)", + "transport": "buffer" + }, + { + "id": "S08.u1", + "method": "PATCH", + "pattern": "/", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/x/x/c/a/a/x" + }, + { + "method": "POST", + "raw": "/x/x/c/b" + }, + { + "method": "GET", + "raw": "/x/x/c/x/ff" + }, + { + "method": "DELETE", + "raw": "/x/x/c/caf%C3%A9" + }, + { + "method": "DELETE", + "raw": "/x/x/c/42/caf%C3%A9" + }, + { + "method": "DELETE", + "raw": "/x/x/c/ff" + }, + { + "method": "HEAD", + "raw": "/x/x/c/x/x/x/" + }, + { + "method": "PATCH", + "raw": "/x/x/c/" + }, + { + "method": "GET", + "raw": "/x/x/c/c/%34%32" + }, + { + "method": "HEAD", + "raw": "/x/x/c/b/c" + }, + { + "method": "HEAD", + "raw": "/x/x/c/c/x/./x" + }, + { + "method": "DELETE", + "raw": "/x/x/c/c/x/x" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/x/x/c/a/a/x", + "normalized": "/x/x/c/a/a/x", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "POST", + "raw": "/x/x/c/b", + "normalized": "/x/x/c/b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "GET", + "raw": "/x/x/c/x/ff", + "normalized": "/x/x/c/x/ff", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "DELETE", + "raw": "/x/x/c/caf%C3%A9", + "normalized": "/x/x/c/caf%C3%A9", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "DELETE", + "raw": "/x/x/c/42/caf%C3%A9", + "normalized": "/x/x/c/42/caf%C3%A9", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "DELETE", + "raw": "/x/x/c/ff", + "normalized": "/x/x/c/ff", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "HEAD", + "raw": "/x/x/c/x/x/x/", + "normalized": "/x/x/c/x/x/x", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PATCH", + "raw": "/x/x/c/", + "normalized": "/x/x/c", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "GET", + "raw": "/x/x/c/c/%34%32", + "normalized": "/x/x/c/c/%34%32", + "match": null, + "resolve": null, + "allow": [ + "PATCH", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/x/x/c/b/c", + "normalized": "/x/x/c/b/c", + "match": { + "id": "S08.s2", + "params": { + "p3": "b" + } + }, + "resolve": { + "id": "S08.s2", + "params": { + "p3": "b" + }, + "implicitHead": false + }, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/x/x/c/c/x/./x", + "normalized": "/x/x/c/c/x/x", + "match": null, + "resolve": null, + "allow": [ + "PUT", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/x/x/c/c/x/x", + "normalized": "/x/x/c/c/x/x", + "match": null, + "resolve": null, + "allow": [ + "PUT", + "OPTIONS" + ] + } + ] + }, + { + "id": "S09", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /x/a", + "declarations": [ + { + "id": "S09.s1", + "method": "OPTIONS", + "pattern": "/x/a/c/:p3([0-9a-f]{2})", + "transport": "buffer" + }, + { + "id": "S09.s2", + "method": "GET", + "pattern": "/x/a/:p2/a", + "transport": "negotiate" + }, + { + "id": "S09.s3", + "method": "OPTIONS", + "pattern": "/x/a/x/:p3(\\d+)/x", + "transport": "buffer" + }, + { + "id": "S09.s4", + "method": "HEAD", + "pattern": "/x/a/:p2(\\d+)", + "transport": "buffer" + }, + { + "id": "S09.s5", + "method": "PUT", + "pattern": "/x/a/:p2(\\d+)", + "transport": "buffer" + }, + { + "id": "S09.s6", + "method": "HEAD", + "pattern": "/x/a/:p2*", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "DELETE", + "raw": "/x/a/7/a" + }, + { + "method": "HEAD", + "raw": "/x/a/x/0a/x" + }, + { + "method": "DELETE", + "raw": "/x/a" + }, + { + "method": "GET", + "raw": "/x/a/a%20b/a%20b/x/" + }, + { + "method": "POST", + "raw": "/x/a/x/caf%C3%A9/x" + }, + { + "method": "GET", + "raw": "//x/a/ff/7/0a" + }, + { + "method": "PUT", + "raw": "//x/a/q/../c" + }, + { + "method": "DELETE", + "raw": "/x/a/" + }, + { + "method": "OPTIONS", + "raw": "/x/q/../a" + }, + { + "method": "POST", + "raw": "/x/a" + }, + { + "method": "OPTIONS", + "raw": "/x/a" + }, + { + "method": "DELETE", + "raw": "/x/a/c" + } + ], + "outcomes": [ + { + "method": "DELETE", + "raw": "/x/a/7/a", + "normalized": "/x/a/7/a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/x/a/x/0a/x", + "normalized": "/x/a/x/0a/x", + "match": { + "id": "S09.s6", + "params": { + "p2": "x/0a/x" + } + }, + "resolve": { + "id": "S09.s6", + "params": { + "p2": "x/0a/x" + }, + "implicitHead": false + }, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/x/a", + "normalized": "/x/a", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/x/a/a%20b/a%20b/x/", + "normalized": "/x/a/a%20b/a%20b/x", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/x/a/x/caf%C3%A9/x", + "normalized": "/x/a/x/caf%C3%A9/x", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "//x/a/ff/7/0a", + "error": { + "name": "InvalidRequestPathError", + "message": "invalid request path: repeated slash" + } + }, + { + "method": "PUT", + "raw": "//x/a/q/../c", + "error": { + "name": "InvalidRequestPathError", + "message": "invalid request path: repeated slash" + } + }, + { + "method": "DELETE", + "raw": "/x/a/", + "normalized": "/x/a", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/x/q/../a", + "normalized": "/x/a", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/x/a", + "normalized": "/x/a", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/x/a", + "normalized": "/x/a", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/x/a/c", + "normalized": "/x/a/c", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + } + ] + }, + { + "id": "S10", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /c", + "declarations": [ + { + "id": "S10.s1", + "method": "GET", + "pattern": "/c/a/:p2(\\d+)", + "transport": "sse" + }, + { + "id": "S10.s2", + "method": "PUT", + "pattern": "/c/:p1/b/:p3", + "transport": "buffer" + }, + { + "id": "S10.s3", + "method": "POST", + "pattern": "/c/:p1/:p2(\\d+)", + "transport": "buffer" + }, + { + "id": "S10.s4", + "method": "PATCH", + "pattern": "/c/b", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "POST", + "raw": "/c/b" + }, + { + "method": "GET", + "raw": "/q/../c/b" + }, + { + "method": "GET", + "raw": "//c/%34%32/42" + }, + { + "method": "OPTIONS", + "raw": "/c" + }, + { + "method": "PUT", + "raw": "/c/x/b/ff" + }, + { + "method": "PATCH", + "raw": "/c/42/0a/0a" + }, + { + "method": "DELETE", + "raw": "/c/x/b/0a" + }, + { + "method": "DELETE", + "raw": "/c/7/b/a/" + }, + { + "method": "HEAD", + "raw": "/c/a/a%20b/" + }, + { + "method": "PUT", + "raw": "/c/%34%32/b/%34%32" + }, + { + "method": "GET", + "raw": "/c/%34%32/b/7" + }, + { + "method": "GET", + "raw": "/c/a/%34%32/" + } + ], + "outcomes": [ + { + "method": "POST", + "raw": "/c/b", + "normalized": "/c/b", + "match": null, + "resolve": null, + "allow": [ + "PATCH", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/q/../c/b", + "normalized": "/c/b", + "match": null, + "resolve": null, + "allow": [ + "PATCH", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "//c/%34%32/42", + "error": { + "name": "InvalidRequestPathError", + "message": "invalid request path: repeated slash" + } + }, + { + "method": "OPTIONS", + "raw": "/c", + "normalized": "/c", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PUT", + "raw": "/c/x/b/ff", + "normalized": "/c/x/b/ff", + "match": { + "id": "S10.s2", + "params": { + "p1": "x", + "p3": "ff" + } + }, + "resolve": { + "id": "S10.s2", + "params": { + "p1": "x", + "p3": "ff" + }, + "implicitHead": false + }, + "allow": [ + "PUT", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/c/42/0a/0a", + "normalized": "/c/42/0a/0a", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "DELETE", + "raw": "/c/x/b/0a", + "normalized": "/c/x/b/0a", + "match": null, + "resolve": null, + "allow": [ + "PUT", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/c/7/b/a/", + "normalized": "/c/7/b/a", + "match": null, + "resolve": null, + "allow": [ + "PUT", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/c/a/a%20b/", + "normalized": "/c/a/a%20b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PUT", + "raw": "/c/%34%32/b/%34%32", + "normalized": "/c/%34%32/b/%34%32", + "match": { + "id": "S10.s2", + "params": { + "p1": "42", + "p3": "42" + } + }, + "resolve": { + "id": "S10.s2", + "params": { + "p1": "42", + "p3": "42" + }, + "implicitHead": false + }, + "allow": [ + "PUT", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/c/%34%32/b/7", + "normalized": "/c/%34%32/b/7", + "match": null, + "resolve": null, + "allow": [ + "PUT", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/c/a/%34%32/", + "normalized": "/c/a/%34%32", + "match": { + "id": "S10.s1", + "params": { + "p2": "42" + } + }, + "resolve": { + "id": "S10.s1", + "params": { + "p2": "42" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "POST", + "OPTIONS" + ] + } + ] + }, + { + "id": "S11", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /b/x", + "declarations": [ + { + "id": "S11.s1", + "method": "GET", + "pattern": "/b/x/x/:p3(\\d+)", + "transport": "ndjson" + }, + { + "id": "S11.s2", + "method": "DELETE", + "pattern": "/b/x/:p2([a-c]+)/:p3", + "transport": "buffer" + }, + { + "id": "S11.s3", + "method": "GET", + "pattern": "/b/x/:p2/c/c", + "transport": "buffer" + }, + { + "id": "S11.s4", + "method": "PUT", + "pattern": "/b/x/:p2*", + "transport": "buffer" + }, + { + "id": "S11.u1", + "method": "POST", + "pattern": "/:p0([0-9a-f]{2})/x/a", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "OPTIONS", + "raw": "/b/x/a%20b/42/" + }, + { + "method": "PUT", + "raw": "/b/x/ff/c/c" + }, + { + "method": "HEAD", + "raw": "/b/x/42/c/c" + }, + { + "method": "PATCH", + "raw": "/b/x/b/c/c" + }, + { + "method": "PATCH", + "raw": "/b/x/x/a%20b" + }, + { + "method": "GET", + "raw": "/b/x/ff/c/c" + }, + { + "method": "OPTIONS", + "raw": "/b/x/ff/a%20b" + }, + { + "method": "GET", + "raw": "/b/x/a%20b/a%20b" + }, + { + "method": "HEAD", + "raw": "/b/x/7/0a/./a%20b" + }, + { + "method": "OPTIONS", + "raw": "/b/x/c/c" + }, + { + "method": "POST", + "raw": "/b/x/b/a%20b" + }, + { + "method": "POST", + "raw": "/b/x/x/b" + } + ], + "outcomes": [ + { + "method": "OPTIONS", + "raw": "/b/x/a%20b/42/", + "normalized": "/b/x/a%20b/42", + "match": null, + "resolve": null, + "allow": [ + "PUT", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/b/x/ff/c/c", + "normalized": "/b/x/ff/c/c", + "match": { + "id": "S11.s4", + "params": { + "p2": "ff/c/c" + } + }, + "resolve": { + "id": "S11.s4", + "params": { + "p2": "ff/c/c" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "PUT", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/b/x/42/c/c", + "normalized": "/b/x/42/c/c", + "match": null, + "resolve": { + "id": "S11.s3", + "params": { + "p2": "42" + }, + "implicitHead": true + }, + "allow": [ + "GET", + "HEAD", + "PUT", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/b/x/b/c/c", + "normalized": "/b/x/b/c/c", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "PUT", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/b/x/x/a%20b", + "normalized": "/b/x/x/a%20b", + "match": null, + "resolve": null, + "allow": [ + "PUT", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/b/x/ff/c/c", + "normalized": "/b/x/ff/c/c", + "match": { + "id": "S11.s3", + "params": { + "p2": "ff" + } + }, + "resolve": { + "id": "S11.s3", + "params": { + "p2": "ff" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "PUT", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/b/x/ff/a%20b", + "normalized": "/b/x/ff/a%20b", + "match": null, + "resolve": null, + "allow": [ + "PUT", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/b/x/a%20b/a%20b", + "normalized": "/b/x/a%20b/a%20b", + "match": null, + "resolve": null, + "allow": [ + "PUT", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/b/x/7/0a/./a%20b", + "normalized": "/b/x/7/0a/a%20b", + "match": null, + "resolve": null, + "allow": [ + "PUT", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/b/x/c/c", + "normalized": "/b/x/c/c", + "match": null, + "resolve": null, + "allow": [ + "PUT", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/b/x/b/a%20b", + "normalized": "/b/x/b/a%20b", + "match": null, + "resolve": null, + "allow": [ + "PUT", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/b/x/x/b", + "normalized": "/b/x/x/b", + "match": null, + "resolve": null, + "allow": [ + "PUT", + "OPTIONS" + ] + } + ] + }, + { + "id": "S12", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /c", + "declarations": [ + { + "id": "S12.s1", + "method": "GET", + "pattern": "/c/c/:p2([a-c]+)", + "transport": "buffer" + }, + { + "id": "S12.s2", + "method": "GET", + "pattern": "/c/:p1/b/:p3(\\d+)", + "transport": "buffer" + }, + { + "id": "S12.s3", + "method": "DELETE", + "pattern": "/c/:p1*", + "transport": "buffer" + }, + { + "id": "S12.s4", + "method": "GET", + "pattern": "/c/c/:p2/c", + "transport": "ndjson" + }, + { + "id": "S12.s5", + "method": "GET", + "pattern": "/c/:p1([0-9a-f]{2})/:p2(\\d+)", + "transport": "buffer" + }, + { + "id": "S12.s6", + "method": "POST", + "pattern": "/c/:p1(\\d+)", + "transport": "buffer" + }, + { + "id": "S12.u1", + "method": "HEAD", + "pattern": "/x", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/c/c/./0a" + }, + { + "method": "PATCH", + "raw": "/c/caf%C3%A9/42" + }, + { + "method": "GET", + "raw": "/c/c/0a" + }, + { + "method": "PUT", + "raw": "//c/%34%32/ff/c" + }, + { + "method": "OPTIONS", + "raw": "/c/%34%32" + }, + { + "method": "PATCH", + "raw": "/c/a/ff/c/." + }, + { + "method": "PATCH", + "raw": "/c/42/b/0a" + }, + { + "method": "DELETE", + "raw": "/c" + }, + { + "method": "OPTIONS", + "raw": "/c/%34%32/7" + }, + { + "method": "PUT", + "raw": "/c/b/c/" + }, + { + "method": "PUT", + "raw": "/c/ff/b/b/" + }, + { + "method": "DELETE", + "raw": "/c/c/q/../%34%32" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/c/c/./0a", + "normalized": "/c/c/0a", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/c/caf%C3%A9/42", + "normalized": "/c/caf%C3%A9/42", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/c/c/0a", + "normalized": "/c/c/0a", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "//c/%34%32/ff/c", + "error": { + "name": "InvalidRequestPathError", + "message": "invalid request path: repeated slash" + } + }, + { + "method": "OPTIONS", + "raw": "/c/%34%32", + "normalized": "/c/%34%32", + "match": null, + "resolve": null, + "allow": [ + "POST", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/c/a/ff/c/.", + "normalized": "/c/a/ff/c", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/c/42/b/0a", + "normalized": "/c/42/b/0a", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/c", + "normalized": "/c", + "match": { + "id": "S12.s3", + "params": { + "p1": "" + } + }, + "resolve": { + "id": "S12.s3", + "params": { + "p1": "" + }, + "implicitHead": false + }, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/c/%34%32/7", + "normalized": "/c/%34%32/7", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/c/b/c/", + "normalized": "/c/b/c", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/c/ff/b/b/", + "normalized": "/c/ff/b/b", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/c/c/q/../%34%32", + "normalized": "/c/c/%34%32", + "match": { + "id": "S12.s3", + "params": { + "p1": "c/42" + } + }, + "resolve": { + "id": "S12.s3", + "params": { + "p1": "c/42" + }, + "implicitHead": false + }, + "allow": [ + "DELETE", + "OPTIONS" + ] + } + ] + }, + { + "id": "S13", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /x/c/c", + "declarations": [ + { + "id": "S13.s1", + "method": "GET", + "pattern": "/x/c/c/x", + "transport": "buffer" + }, + { + "id": "S13.s2", + "method": "HEAD", + "pattern": "/x/c/c/:p3/x", + "transport": "buffer" + }, + { + "id": "S13.s3", + "method": "HEAD", + "pattern": "/x/c/c/x", + "transport": "buffer" + }, + { + "id": "S13.s4", + "method": "GET", + "pattern": "/x/c/c/:p3/c", + "transport": "buffer" + }, + { + "id": "S13.s5", + "method": "GET", + "pattern": "/x/c/c/:p3(\\d+)/:p4([0-9a-f]{2})/b", + "transport": "buffer" + }, + { + "id": "S13.u1", + "method": "GET", + "pattern": "/", + "transport": "buffer" + }, + { + "id": "S13.u2", + "method": "HEAD", + "pattern": "/:p0([0-9a-f]{2})", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/x/c/c/x" + }, + { + "method": "OPTIONS", + "raw": "/x/c/c/b/." + }, + { + "method": "PUT", + "raw": "/x/c/c" + }, + { + "method": "GET", + "raw": "//x/c/c/caf%C3%A9/c" + }, + { + "method": "DELETE", + "raw": "/x/c/c/caf%C3%A9" + }, + { + "method": "OPTIONS", + "raw": "/x/c/c/ff" + }, + { + "method": "PATCH", + "raw": "/x/c/c/c/x" + }, + { + "method": "HEAD", + "raw": "/x/c/c/b/" + }, + { + "method": "DELETE", + "raw": "/x/c/c/42/x/b/" + }, + { + "method": "PATCH", + "raw": "/./x/c/c/x/x" + }, + { + "method": "GET", + "raw": "//x/c/c/0a/x" + }, + { + "method": "GET", + "raw": "/x/c/c/a/caf%C3%A9/7" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/x/c/c/x", + "normalized": "/x/c/c/x", + "match": { + "id": "S13.s1", + "params": {} + }, + "resolve": { + "id": "S13.s1", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/x/c/c/b/.", + "normalized": "/x/c/c/b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PUT", + "raw": "/x/c/c", + "normalized": "/x/c/c", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "GET", + "raw": "//x/c/c/caf%C3%A9/c", + "error": { + "name": "InvalidRequestPathError", + "message": "invalid request path: repeated slash" + } + }, + { + "method": "DELETE", + "raw": "/x/c/c/caf%C3%A9", + "normalized": "/x/c/c/caf%C3%A9", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "OPTIONS", + "raw": "/x/c/c/ff", + "normalized": "/x/c/c/ff", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PATCH", + "raw": "/x/c/c/c/x", + "normalized": "/x/c/c/c/x", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/x/c/c/b/", + "normalized": "/x/c/c/b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "DELETE", + "raw": "/x/c/c/42/x/b/", + "normalized": "/x/c/c/42/x/b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PATCH", + "raw": "/./x/c/c/x/x", + "normalized": "/x/c/c/x/x", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "//x/c/c/0a/x", + "error": { + "name": "InvalidRequestPathError", + "message": "invalid request path: repeated slash" + } + }, + { + "method": "GET", + "raw": "/x/c/c/a/caf%C3%A9/7", + "normalized": "/x/c/c/a/caf%C3%A9/7", + "match": null, + "resolve": null, + "allow": [] + } + ] + }, + { + "id": "S14", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /b", + "declarations": [ + { + "id": "S14.s1", + "method": "GET", + "pattern": "/b/x/x", + "transport": "negotiate" + }, + { + "id": "S14.s2", + "method": "DELETE", + "pattern": "/b/:p1(\\d+)", + "transport": "buffer" + }, + { + "id": "S14.s3", + "method": "GET", + "pattern": "/b/a/b/a", + "transport": "sse" + }, + { + "id": "S14.u1", + "method": "POST", + "pattern": "/:p0", + "transport": "buffer" + }, + { + "id": "S14.u2", + "method": "GET", + "pattern": "/", + "transport": "buffer" + }, + { + "id": "S14.u3", + "method": "HEAD", + "pattern": "/", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "PUT", + "raw": "/b/7/b" + }, + { + "method": "HEAD", + "raw": "/b/x/x" + }, + { + "method": "OPTIONS", + "raw": "/b/q/../42/a%20b" + }, + { + "method": "OPTIONS", + "raw": "/b/a/b/a" + }, + { + "method": "GET", + "raw": "/b/c/." + }, + { + "method": "GET", + "raw": "/b/a/b/a" + }, + { + "method": "PATCH", + "raw": "/b/a/b/a" + }, + { + "method": "POST", + "raw": "/b/42/./a/b" + }, + { + "method": "DELETE", + "raw": "/b/a" + }, + { + "method": "GET", + "raw": "/b/a/b/a" + }, + { + "method": "PUT", + "raw": "/b/a" + }, + { + "method": "PUT", + "raw": "/b/ff/" + } + ], + "outcomes": [ + { + "method": "PUT", + "raw": "/b/7/b", + "normalized": "/b/7/b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "HEAD", + "raw": "/b/x/x", + "normalized": "/b/x/x", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/b/q/../42/a%20b", + "normalized": "/b/42/a%20b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "OPTIONS", + "raw": "/b/a/b/a", + "normalized": "/b/a/b/a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/b/c/.", + "normalized": "/b/c", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "GET", + "raw": "/b/a/b/a", + "normalized": "/b/a/b/a", + "match": { + "id": "S14.s3", + "params": {} + }, + "resolve": { + "id": "S14.s3", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/b/a/b/a", + "normalized": "/b/a/b/a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/b/42/./a/b", + "normalized": "/b/42/a/b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "DELETE", + "raw": "/b/a", + "normalized": "/b/a", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "GET", + "raw": "/b/a/b/a", + "normalized": "/b/a/b/a", + "match": { + "id": "S14.s3", + "params": {} + }, + "resolve": { + "id": "S14.s3", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/b/a", + "normalized": "/b/a", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PUT", + "raw": "/b/ff/", + "normalized": "/b/ff", + "match": null, + "resolve": null, + "allow": [] + } + ] + }, + { + "id": "S15", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /x/b", + "declarations": [ + { + "id": "S15.s1", + "method": "HEAD", + "pattern": "/x/b/b/a/:p4", + "transport": "buffer" + }, + { + "id": "S15.s2", + "method": "DELETE", + "pattern": "/x/b/:p2([a-c]+)/:p3", + "transport": "buffer" + }, + { + "id": "S15.s3", + "method": "PATCH", + "pattern": "/x/b/:p2([a-c]+)/a/:p4", + "transport": "buffer" + }, + { + "id": "S15.s4", + "method": "PATCH", + "pattern": "/x/b/c/a", + "transport": "buffer" + }, + { + "id": "S15.u1", + "method": "GET", + "pattern": "/:p0/:p1(\\d+)", + "transport": "buffer" + }, + { + "id": "S15.u2", + "method": "POST", + "pattern": "/", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "PATCH", + "raw": "/x/b/a%20b/a/0a" + }, + { + "method": "POST", + "raw": "/x/b/a/42" + }, + { + "method": "POST", + "raw": "/x/b" + }, + { + "method": "PATCH", + "raw": "/x/b/ff" + }, + { + "method": "HEAD", + "raw": "/x/b/b/a/a" + }, + { + "method": "POST", + "raw": "/x/b/c/a" + }, + { + "method": "OPTIONS", + "raw": "/x/b/b/ff" + }, + { + "method": "DELETE", + "raw": "/x/b/c/b" + }, + { + "method": "DELETE", + "raw": "/x/b/caf%C3%A9/a" + }, + { + "method": "PUT", + "raw": "/x/b" + }, + { + "method": "PATCH", + "raw": "/x/b/7/caf%C3%A9" + }, + { + "method": "DELETE", + "raw": "/x/./b/b/a" + } + ], + "outcomes": [ + { + "method": "PATCH", + "raw": "/x/b/a%20b/a/0a", + "normalized": "/x/b/a%20b/a/0a", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "POST", + "raw": "/x/b/a/42", + "normalized": "/x/b/a/42", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/x/b", + "normalized": "/x/b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PATCH", + "raw": "/x/b/ff", + "normalized": "/x/b/ff", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "HEAD", + "raw": "/x/b/b/a/a", + "normalized": "/x/b/b/a/a", + "match": { + "id": "S15.s1", + "params": { + "p4": "a" + } + }, + "resolve": { + "id": "S15.s1", + "params": { + "p4": "a" + }, + "implicitHead": false + }, + "allow": [ + "HEAD", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/x/b/c/a", + "normalized": "/x/b/c/a", + "match": null, + "resolve": null, + "allow": [ + "PATCH", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/x/b/b/ff", + "normalized": "/x/b/b/ff", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/x/b/c/b", + "normalized": "/x/b/c/b", + "match": { + "id": "S15.s2", + "params": { + "p2": "c", + "p3": "b" + } + }, + "resolve": { + "id": "S15.s2", + "params": { + "p2": "c", + "p3": "b" + }, + "implicitHead": false + }, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/x/b/caf%C3%A9/a", + "normalized": "/x/b/caf%C3%A9/a", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PUT", + "raw": "/x/b", + "normalized": "/x/b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PATCH", + "raw": "/x/b/7/caf%C3%A9", + "normalized": "/x/b/7/caf%C3%A9", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "DELETE", + "raw": "/x/./b/b/a", + "normalized": "/x/b/b/a", + "match": { + "id": "S15.s2", + "params": { + "p2": "b", + "p3": "a" + } + }, + "resolve": { + "id": "S15.s2", + "params": { + "p2": "b", + "p3": "a" + }, + "implicitHead": false + }, + "allow": [ + "DELETE", + "OPTIONS" + ] + } + ] + }, + { + "id": "S16", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /c", + "declarations": [ + { + "id": "S16.s1", + "method": "HEAD", + "pattern": "/c/x/:p2([0-9a-f]{2})/c", + "transport": "buffer" + }, + { + "id": "S16.s2", + "method": "DELETE", + "pattern": "/c/:p1(\\d+)/:p2([a-c]+)", + "transport": "buffer" + }, + { + "id": "S16.s3", + "method": "POST", + "pattern": "/c/:p1", + "transport": "buffer" + }, + { + "id": "S16.s4", + "method": "PATCH", + "pattern": "/c/b/:p2/:p3(\\d+)", + "transport": "buffer" + }, + { + "id": "S16.s5", + "method": "POST", + "pattern": "/c/:p1/:p2", + "transport": "buffer" + }, + { + "id": "S16.u1", + "method": "PATCH", + "pattern": "/c/:p1/a", + "transport": "buffer" + }, + { + "id": "S16.u2", + "method": "DELETE", + "pattern": "/", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "POST", + "raw": "/c/x/c/c/" + }, + { + "method": "GET", + "raw": "/c/a%20b/42/c" + }, + { + "method": "PATCH", + "raw": "/c/x/b/c" + }, + { + "method": "DELETE", + "raw": "/c/0a" + }, + { + "method": "GET", + "raw": "/c/c" + }, + { + "method": "GET", + "raw": "/c/b/a/a%20b" + }, + { + "method": "DELETE", + "raw": "/c/" + }, + { + "method": "OPTIONS", + "raw": "/c/c/c/42" + }, + { + "method": "OPTIONS", + "raw": "/c/ff" + }, + { + "method": "GET", + "raw": "/c/b/b/caf%C3%A9" + }, + { + "method": "PATCH", + "raw": "/c/b/caf%C3%A9/a" + }, + { + "method": "HEAD", + "raw": "/c/a" + } + ], + "outcomes": [ + { + "method": "POST", + "raw": "/c/x/c/c/", + "normalized": "/c/x/c/c", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "GET", + "raw": "/c/a%20b/42/c", + "normalized": "/c/a%20b/42/c", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PATCH", + "raw": "/c/x/b/c", + "normalized": "/c/x/b/c", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "DELETE", + "raw": "/c/0a", + "normalized": "/c/0a", + "match": null, + "resolve": null, + "allow": [ + "POST", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/c/c", + "normalized": "/c/c", + "match": null, + "resolve": null, + "allow": [ + "POST", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/c/b/a/a%20b", + "normalized": "/c/b/a/a%20b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "DELETE", + "raw": "/c/", + "normalized": "/c", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "OPTIONS", + "raw": "/c/c/c/42", + "normalized": "/c/c/c/42", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "OPTIONS", + "raw": "/c/ff", + "normalized": "/c/ff", + "match": null, + "resolve": null, + "allow": [ + "POST", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/c/b/b/caf%C3%A9", + "normalized": "/c/b/b/caf%C3%A9", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PATCH", + "raw": "/c/b/caf%C3%A9/a", + "normalized": "/c/b/caf%C3%A9/a", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "HEAD", + "raw": "/c/a", + "normalized": "/c/a", + "match": null, + "resolve": null, + "allow": [ + "POST", + "OPTIONS" + ] + } + ] + }, + { + "id": "S17", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /a/c/c", + "declarations": [ + { + "id": "S17.s1", + "method": "DELETE", + "pattern": "/a/c/c/a", + "transport": "buffer" + }, + { + "id": "S17.s2", + "method": "OPTIONS", + "pattern": "/a/c/c/:p3(\\d+)/:p4", + "transport": "buffer" + }, + { + "id": "S17.s3", + "method": "GET", + "pattern": "/a/c/c/:p3", + "transport": "buffer" + }, + { + "id": "S17.s4", + "method": "POST", + "pattern": "/a/c/c/:p3([0-9a-f]{2})/:p4", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "PATCH", + "raw": "/a/c/c/42/7/." + }, + { + "method": "PATCH", + "raw": "/./a/c/c/c/x" + }, + { + "method": "DELETE", + "raw": "//a/c/c/7/b" + }, + { + "method": "OPTIONS", + "raw": "//a/c/c/a%20b" + }, + { + "method": "GET", + "raw": "/a/./c/c/x/0a" + }, + { + "method": "PUT", + "raw": "/a/c/c/a" + }, + { + "method": "GET", + "raw": "/a/c/c/a" + }, + { + "method": "PATCH", + "raw": "/a/c/c/ff/" + }, + { + "method": "OPTIONS", + "raw": "/a/c/c/b" + }, + { + "method": "DELETE", + "raw": "/a/c/c/a" + }, + { + "method": "DELETE", + "raw": "/a/c/c/42/%34%32" + }, + { + "method": "DELETE", + "raw": "/a/c/c/caf%C3%A9/b" + } + ], + "outcomes": [ + { + "method": "PATCH", + "raw": "/a/c/c/42/7/.", + "normalized": "/a/c/c/42/7", + "match": null, + "resolve": null, + "allow": [ + "POST", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/./a/c/c/c/x", + "normalized": "/a/c/c/c/x", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "DELETE", + "raw": "//a/c/c/7/b", + "error": { + "name": "InvalidRequestPathError", + "message": "invalid request path: repeated slash" + } + }, + { + "method": "OPTIONS", + "raw": "//a/c/c/a%20b", + "error": { + "name": "InvalidRequestPathError", + "message": "invalid request path: repeated slash" + } + }, + { + "method": "GET", + "raw": "/a/./c/c/x/0a", + "normalized": "/a/c/c/x/0a", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PUT", + "raw": "/a/c/c/a", + "normalized": "/a/c/c/a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/a/c/c/a", + "normalized": "/a/c/c/a", + "match": { + "id": "S17.s3", + "params": { + "p3": "a" + } + }, + "resolve": { + "id": "S17.s3", + "params": { + "p3": "a" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/a/c/c/ff/", + "normalized": "/a/c/c/ff", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/a/c/c/b", + "normalized": "/a/c/c/b", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/a/c/c/a", + "normalized": "/a/c/c/a", + "match": { + "id": "S17.s1", + "params": {} + }, + "resolve": { + "id": "S17.s1", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/a/c/c/42/%34%32", + "normalized": "/a/c/c/42/%34%32", + "match": null, + "resolve": null, + "allow": [ + "POST", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/a/c/c/caf%C3%A9/b", + "normalized": "/a/c/c/caf%C3%A9/b", + "match": null, + "resolve": null, + "allow": [] + } + ] + }, + { + "id": "S18", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /x", + "declarations": [ + { + "id": "S18.s1", + "method": "DELETE", + "pattern": "/x/x/b/a", + "transport": "buffer" + }, + { + "id": "S18.s2", + "method": "PUT", + "pattern": "/x/:p1/:p2([0-9a-f]{2})/:p3", + "transport": "buffer" + }, + { + "id": "S18.s3", + "method": "OPTIONS", + "pattern": "/x/x", + "transport": "buffer" + }, + { + "id": "S18.s4", + "method": "POST", + "pattern": "/x/c/x", + "transport": "buffer" + }, + { + "id": "S18.u1", + "method": "OPTIONS", + "pattern": "/b/b/:p2([0-9a-f]{2})", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "POST", + "raw": "/x/ff/x/" + }, + { + "method": "OPTIONS", + "raw": "/x/x/x/" + }, + { + "method": "OPTIONS", + "raw": "/x/caf%C3%A9" + }, + { + "method": "DELETE", + "raw": "/x/x/x" + }, + { + "method": "POST", + "raw": "/x/0a/." + }, + { + "method": "POST", + "raw": "/x/x" + }, + { + "method": "HEAD", + "raw": "/x/0a/b/a" + }, + { + "method": "GET", + "raw": "/x/x/b/a/" + }, + { + "method": "GET", + "raw": "/x/7/" + }, + { + "method": "DELETE", + "raw": "/x/c/x/" + }, + { + "method": "HEAD", + "raw": "/x/x/" + }, + { + "method": "PATCH", + "raw": "/x/x" + } + ], + "outcomes": [ + { + "method": "POST", + "raw": "/x/ff/x/", + "normalized": "/x/ff/x", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "OPTIONS", + "raw": "/x/x/x/", + "normalized": "/x/x/x", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "OPTIONS", + "raw": "/x/caf%C3%A9", + "normalized": "/x/caf%C3%A9", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "DELETE", + "raw": "/x/x/x", + "normalized": "/x/x/x", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "POST", + "raw": "/x/0a/.", + "normalized": "/x/0a", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "POST", + "raw": "/x/x", + "normalized": "/x/x", + "match": null, + "resolve": null, + "allow": [ + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/x/0a/b/a", + "normalized": "/x/0a/b/a", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "GET", + "raw": "/x/x/b/a/", + "normalized": "/x/x/b/a", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/x/7/", + "normalized": "/x/7", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "DELETE", + "raw": "/x/c/x/", + "normalized": "/x/c/x", + "match": null, + "resolve": null, + "allow": [ + "POST", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/x/x/", + "normalized": "/x/x", + "match": null, + "resolve": null, + "allow": [ + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/x/x", + "normalized": "/x/x", + "match": null, + "resolve": null, + "allow": [ + "OPTIONS" + ] + } + ] + }, + { + "id": "S19", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /", + "declarations": [ + { + "id": "S19.s1", + "method": "DELETE", + "pattern": "/x/:p1(\\d+)/:p2", + "transport": "buffer" + }, + { + "id": "S19.s2", + "method": "GET", + "pattern": "/:p0/c", + "transport": "ndjson" + }, + { + "id": "S19.s3", + "method": "GET", + "pattern": "/:p0([a-c]+)/a", + "transport": "buffer" + }, + { + "id": "S19.u1", + "method": "GET", + "pattern": "/a", + "transport": "buffer" + }, + { + "id": "S19.u2", + "method": "GET", + "pattern": "/", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/c/a" + }, + { + "method": "OPTIONS", + "raw": "/ff/a" + }, + { + "method": "PATCH", + "raw": "/" + }, + { + "method": "DELETE", + "raw": "/0a/c" + }, + { + "method": "GET", + "raw": "/x/b/c" + }, + { + "method": "OPTIONS", + "raw": "/a/b" + }, + { + "method": "GET", + "raw": "//b/c" + }, + { + "method": "DELETE", + "raw": "/7/c/" + }, + { + "method": "HEAD", + "raw": "/42/c/" + }, + { + "method": "HEAD", + "raw": "/42/a" + }, + { + "method": "GET", + "raw": "/ff/a%20b/" + }, + { + "method": "OPTIONS", + "raw": "/x/a" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/c/a", + "normalized": "/c/a", + "match": { + "id": "S19.s3", + "params": { + "p0": "c" + } + }, + "resolve": { + "id": "S19.s3", + "params": { + "p0": "c" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/ff/a", + "normalized": "/ff/a", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PATCH", + "raw": "/", + "normalized": "/", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/0a/c", + "normalized": "/0a/c", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/x/b/c", + "normalized": "/x/b/c", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "OPTIONS", + "raw": "/a/b", + "normalized": "/a/b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "GET", + "raw": "//b/c", + "error": { + "name": "InvalidRequestPathError", + "message": "invalid request path: repeated slash" + } + }, + { + "method": "DELETE", + "raw": "/7/c/", + "normalized": "/7/c", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/42/c/", + "normalized": "/42/c", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/42/a", + "normalized": "/42/a", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "GET", + "raw": "/ff/a%20b/", + "normalized": "/ff/a%20b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "OPTIONS", + "raw": "/x/a", + "normalized": "/x/a", + "match": null, + "resolve": null, + "allow": [] + } + ] + }, + { + "id": "S20", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /a", + "declarations": [ + { + "id": "S20.s1", + "method": "OPTIONS", + "pattern": "/a/x/b", + "transport": "buffer" + }, + { + "id": "S20.s2", + "method": "OPTIONS", + "pattern": "/a/:p1", + "transport": "buffer" + }, + { + "id": "S20.s3", + "method": "GET", + "pattern": "/a/:p1(\\d+)/a/c", + "transport": "sse" + }, + { + "id": "S20.s4", + "method": "HEAD", + "pattern": "/a/x/a", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/a/x/caf%C3%A9/7" + }, + { + "method": "GET", + "raw": "/a/0a/b" + }, + { + "method": "HEAD", + "raw": "/a/caf%C3%A9/ff" + }, + { + "method": "HEAD", + "raw": "/a/x/b" + }, + { + "method": "PUT", + "raw": "/q/../a/x/b" + }, + { + "method": "DELETE", + "raw": "//a/x/a/" + }, + { + "method": "GET", + "raw": "/a/x/a" + }, + { + "method": "PATCH", + "raw": "/a/x/b" + }, + { + "method": "GET", + "raw": "/a/a%20b" + }, + { + "method": "GET", + "raw": "/a/%34%32" + }, + { + "method": "PUT", + "raw": "/a/%34%32" + }, + { + "method": "OPTIONS", + "raw": "/a/c/" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/a/x/caf%C3%A9/7", + "normalized": "/a/x/caf%C3%A9/7", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "GET", + "raw": "/a/0a/b", + "normalized": "/a/0a/b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "HEAD", + "raw": "/a/caf%C3%A9/ff", + "normalized": "/a/caf%C3%A9/ff", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "HEAD", + "raw": "/a/x/b", + "normalized": "/a/x/b", + "match": null, + "resolve": null, + "allow": [ + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/q/../a/x/b", + "normalized": "/a/x/b", + "match": null, + "resolve": null, + "allow": [ + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "//a/x/a/", + "error": { + "name": "InvalidRequestPathError", + "message": "invalid request path: repeated slash" + } + }, + { + "method": "GET", + "raw": "/a/x/a", + "normalized": "/a/x/a", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/a/x/b", + "normalized": "/a/x/b", + "match": null, + "resolve": null, + "allow": [ + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/a/a%20b", + "normalized": "/a/a%20b", + "match": null, + "resolve": null, + "allow": [ + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/a/%34%32", + "normalized": "/a/%34%32", + "match": null, + "resolve": null, + "allow": [ + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/a/%34%32", + "normalized": "/a/%34%32", + "match": null, + "resolve": null, + "allow": [ + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/a/c/", + "normalized": "/a/c", + "match": { + "id": "S20.s2", + "params": { + "p1": "c" + } + }, + "resolve": { + "id": "S20.s2", + "params": { + "p1": "c" + }, + "implicitHead": false + }, + "allow": [ + "OPTIONS" + ] + } + ] + }, + { + "id": "S21", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /b/b/x", + "declarations": [ + { + "id": "S21.s1", + "method": "GET", + "pattern": "/b/b/x/x/:p4([0-9a-f]{2})", + "transport": "buffer" + }, + { + "id": "S21.s2", + "method": "PATCH", + "pattern": "/b/b/x/:p3/x/a", + "transport": "buffer" + }, + { + "id": "S21.s3", + "method": "PATCH", + "pattern": "/b/b/x/:p3(\\d+)", + "transport": "buffer" + }, + { + "id": "S21.s4", + "method": "OPTIONS", + "pattern": "/b/b/x/c/x/:p5", + "transport": "buffer" + }, + { + "id": "S21.s5", + "method": "GET", + "pattern": "/b/b/x/:p3*", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "PATCH", + "raw": "/b/b/x/7/x/a" + }, + { + "method": "OPTIONS", + "raw": "/b/b/x/x/ff" + }, + { + "method": "POST", + "raw": "/b/b/x/0a" + }, + { + "method": "GET", + "raw": "//b/b/x/42/c" + }, + { + "method": "GET", + "raw": "/b/b/x/x/" + }, + { + "method": "OPTIONS", + "raw": "/b/b/x/a%20b/x/a" + }, + { + "method": "GET", + "raw": "/b/b/x/c/x/a%20b" + }, + { + "method": "GET", + "raw": "/b/b/x/x/x/a" + }, + { + "method": "POST", + "raw": "/b/b/x/b" + }, + { + "method": "PUT", + "raw": "/b/b/x/c/b/a%20b" + }, + { + "method": "DELETE", + "raw": "/b/b/x/c/x/a" + }, + { + "method": "PATCH", + "raw": "/b/q/../b/x/x" + } + ], + "outcomes": [ + { + "method": "PATCH", + "raw": "/b/b/x/7/x/a", + "normalized": "/b/b/x/7/x/a", + "match": { + "id": "S21.s2", + "params": { + "p3": "7" + } + }, + "resolve": { + "id": "S21.s2", + "params": { + "p3": "7" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/b/b/x/x/ff", + "normalized": "/b/b/x/x/ff", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/b/b/x/0a", + "normalized": "/b/b/x/0a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "//b/b/x/42/c", + "error": { + "name": "InvalidRequestPathError", + "message": "invalid request path: repeated slash" + } + }, + { + "method": "GET", + "raw": "/b/b/x/x/", + "normalized": "/b/b/x/x", + "match": { + "id": "S21.s5", + "params": { + "p3": "x" + } + }, + "resolve": { + "id": "S21.s5", + "params": { + "p3": "x" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/b/b/x/a%20b/x/a", + "normalized": "/b/b/x/a%20b/x/a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/b/b/x/c/x/a%20b", + "normalized": "/b/b/x/c/x/a%20b", + "match": { + "id": "S21.s5", + "params": { + "p3": "c/x/a b" + } + }, + "resolve": { + "id": "S21.s5", + "params": { + "p3": "c/x/a b" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/b/b/x/x/x/a", + "normalized": "/b/b/x/x/x/a", + "match": { + "id": "S21.s5", + "params": { + "p3": "x/x/a" + } + }, + "resolve": { + "id": "S21.s5", + "params": { + "p3": "x/x/a" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/b/b/x/b", + "normalized": "/b/b/x/b", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/b/b/x/c/b/a%20b", + "normalized": "/b/b/x/c/b/a%20b", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/b/b/x/c/x/a", + "normalized": "/b/b/x/c/x/a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/b/q/../b/x/x", + "normalized": "/b/b/x/x", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + } + ] + }, + { + "id": "S22", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /", + "declarations": [ + { + "id": "S22.s1", + "method": "PUT", + "pattern": "/x/b/c", + "transport": "buffer" + }, + { + "id": "S22.s2", + "method": "PATCH", + "pattern": "/:p0/:p1([0-9a-f]{2})/x", + "transport": "buffer" + }, + { + "id": "S22.s3", + "method": "HEAD", + "pattern": "/:p0(\\d+)", + "transport": "buffer" + }, + { + "id": "S22.s4", + "method": "PATCH", + "pattern": "/:p0", + "transport": "buffer" + }, + { + "id": "S22.s5", + "method": "DELETE", + "pattern": "/b/:p1([a-c]+)/:p2", + "transport": "buffer" + }, + { + "id": "S22.u1", + "method": "GET", + "pattern": "/:p0", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "HEAD", + "raw": "/a" + }, + { + "method": "PATCH", + "raw": "/x/b/q/../c" + }, + { + "method": "OPTIONS", + "raw": "/b/ff/a%20b" + }, + { + "method": "OPTIONS", + "raw": "/a%20b" + }, + { + "method": "PUT", + "raw": "/caf%C3%A9" + }, + { + "method": "OPTIONS", + "raw": "/b/42/a/" + }, + { + "method": "OPTIONS", + "raw": "/x" + }, + { + "method": "GET", + "raw": "/42" + }, + { + "method": "GET", + "raw": "/." + }, + { + "method": "HEAD", + "raw": "/x" + }, + { + "method": "HEAD", + "raw": "/x" + }, + { + "method": "GET", + "raw": "/x/b/c" + } + ], + "outcomes": [ + { + "method": "HEAD", + "raw": "/a", + "normalized": "/a", + "match": null, + "resolve": { + "id": "S22.u1", + "params": { + "p0": "a" + }, + "implicitHead": true + }, + "allow": [ + "GET", + "HEAD", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/x/b/q/../c", + "normalized": "/x/b/c", + "match": null, + "resolve": null, + "allow": [ + "PUT", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/b/ff/a%20b", + "normalized": "/b/ff/a%20b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "OPTIONS", + "raw": "/a%20b", + "normalized": "/a%20b", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/caf%C3%A9", + "normalized": "/caf%C3%A9", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/b/42/a/", + "normalized": "/b/42/a", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "OPTIONS", + "raw": "/x", + "normalized": "/x", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/42", + "normalized": "/42", + "match": { + "id": "S22.u1", + "params": { + "p0": "42" + } + }, + "resolve": { + "id": "S22.u1", + "params": { + "p0": "42" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/.", + "normalized": "/", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "HEAD", + "raw": "/x", + "normalized": "/x", + "match": null, + "resolve": { + "id": "S22.u1", + "params": { + "p0": "x" + }, + "implicitHead": true + }, + "allow": [ + "GET", + "HEAD", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/x", + "normalized": "/x", + "match": null, + "resolve": { + "id": "S22.u1", + "params": { + "p0": "x" + }, + "implicitHead": true + }, + "allow": [ + "GET", + "HEAD", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/x/b/c", + "normalized": "/x/b/c", + "match": null, + "resolve": null, + "allow": [ + "PUT", + "OPTIONS" + ] + } + ] + }, + { + "id": "S23", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /c/x/c", + "declarations": [ + { + "id": "S23.s1", + "method": "HEAD", + "pattern": "/c/x/c/b/x/a", + "transport": "buffer" + }, + { + "id": "S23.s2", + "method": "POST", + "pattern": "/c/x/c/:p3", + "transport": "buffer" + }, + { + "id": "S23.s3", + "method": "DELETE", + "pattern": "/c/x/c/a", + "transport": "buffer" + }, + { + "id": "S23.s4", + "method": "DELETE", + "pattern": "/c/x/c/:p3(\\d+)", + "transport": "buffer" + }, + { + "id": "S23.s5", + "method": "OPTIONS", + "pattern": "/c/x/c/:p3([a-c]+)/x", + "transport": "buffer" + }, + { + "id": "S23.s6", + "method": "POST", + "pattern": "/c/x/c/:p3([a-c]+)/:p4(\\d+)", + "transport": "buffer" + }, + { + "id": "S23.u1", + "method": "POST", + "pattern": "/c", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "PATCH", + "raw": "/c/x/q/../c/b/x" + }, + { + "method": "PUT", + "raw": "/c/x/c/b/x/a" + }, + { + "method": "PATCH", + "raw": "/c/x/c" + }, + { + "method": "GET", + "raw": "/c/x/c/c" + }, + { + "method": "GET", + "raw": "/c/x/c/7" + }, + { + "method": "HEAD", + "raw": "/c/x/c/a" + }, + { + "method": "DELETE", + "raw": "/c/x/c/7/7" + }, + { + "method": "OPTIONS", + "raw": "/c/x/c" + }, + { + "method": "PATCH", + "raw": "/c/x/c/0a/." + }, + { + "method": "HEAD", + "raw": "/c/x/c/ff/x" + }, + { + "method": "HEAD", + "raw": "/c/x/c/x/c" + }, + { + "method": "GET", + "raw": "/c/x/c/a" + } + ], + "outcomes": [ + { + "method": "PATCH", + "raw": "/c/x/q/../c/b/x", + "normalized": "/c/x/c/b/x", + "match": null, + "resolve": null, + "allow": [ + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/c/x/c/b/x/a", + "normalized": "/c/x/c/b/x/a", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/c/x/c", + "normalized": "/c/x/c", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "GET", + "raw": "/c/x/c/c", + "normalized": "/c/x/c/c", + "match": null, + "resolve": null, + "allow": [ + "POST", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/c/x/c/7", + "normalized": "/c/x/c/7", + "match": null, + "resolve": null, + "allow": [ + "POST", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/c/x/c/a", + "normalized": "/c/x/c/a", + "match": null, + "resolve": null, + "allow": [ + "POST", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/c/x/c/7/7", + "normalized": "/c/x/c/7/7", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "OPTIONS", + "raw": "/c/x/c", + "normalized": "/c/x/c", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PATCH", + "raw": "/c/x/c/0a/.", + "normalized": "/c/x/c/0a", + "match": null, + "resolve": null, + "allow": [ + "POST", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/c/x/c/ff/x", + "normalized": "/c/x/c/ff/x", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "HEAD", + "raw": "/c/x/c/x/c", + "normalized": "/c/x/c/x/c", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "GET", + "raw": "/c/x/c/a", + "normalized": "/c/x/c/a", + "match": null, + "resolve": null, + "allow": [ + "POST", + "DELETE", + "OPTIONS" + ] + } + ] + }, + { + "id": "S24", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /b", + "declarations": [ + { + "id": "S24.s1", + "method": "HEAD", + "pattern": "/b/x/x/:p3([a-c]+)", + "transport": "buffer" + }, + { + "id": "S24.s2", + "method": "OPTIONS", + "pattern": "/b/:p1/:p2", + "transport": "buffer" + }, + { + "id": "S24.s3", + "method": "GET", + "pattern": "/b/:p1*", + "transport": "ndjson" + }, + { + "id": "S24.s4", + "method": "OPTIONS", + "pattern": "/b/b/:p2", + "transport": "buffer" + }, + { + "id": "S24.u1", + "method": "GET", + "pattern": "/c/c/b/:p3*", + "transport": "buffer" + }, + { + "id": "S24.u2", + "method": "HEAD", + "pattern": "/x/b/:p2", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/b/x/a/." + }, + { + "method": "OPTIONS", + "raw": "/b/42/7" + }, + { + "method": "POST", + "raw": "/b" + }, + { + "method": "DELETE", + "raw": "/b/x/c/" + }, + { + "method": "DELETE", + "raw": "/b/b/ff/" + }, + { + "method": "PUT", + "raw": "//b/b/ff" + }, + { + "method": "PUT", + "raw": "/b/b/caf%C3%A9/" + }, + { + "method": "PATCH", + "raw": "/b/x/x/b/" + }, + { + "method": "HEAD", + "raw": "/b" + }, + { + "method": "GET", + "raw": "//b/b/q/../7" + }, + { + "method": "GET", + "raw": "/b/x/x/0a" + }, + { + "method": "PUT", + "raw": "/b/b" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/b/x/a/.", + "normalized": "/b/x/a", + "match": { + "id": "S24.s3", + "params": { + "p1": "x/a" + } + }, + "resolve": { + "id": "S24.s3", + "params": { + "p1": "x/a" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/b/42/7", + "normalized": "/b/42/7", + "match": { + "id": "S24.s2", + "params": { + "p1": "42", + "p2": "7" + } + }, + "resolve": { + "id": "S24.s2", + "params": { + "p1": "42", + "p2": "7" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/b", + "normalized": "/b", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/b/x/c/", + "normalized": "/b/x/c", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/b/b/ff/", + "normalized": "/b/b/ff", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "//b/b/ff", + "error": { + "name": "InvalidRequestPathError", + "message": "invalid request path: repeated slash" + } + }, + { + "method": "PUT", + "raw": "/b/b/caf%C3%A9/", + "normalized": "/b/b/caf%C3%A9", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/b/x/x/b/", + "normalized": "/b/x/x/b", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/b", + "normalized": "/b", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "//b/b/q/../7", + "error": { + "name": "InvalidRequestPathError", + "message": "invalid request path: repeated slash" + } + }, + { + "method": "GET", + "raw": "/b/x/x/0a", + "normalized": "/b/x/x/0a", + "match": { + "id": "S24.s3", + "params": { + "p1": "x/x/0a" + } + }, + "resolve": { + "id": "S24.s3", + "params": { + "p1": "x/x/0a" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/b/b", + "normalized": "/b/b", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + } + ] + }, + { + "id": "S25", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /a", + "declarations": [ + { + "id": "S25.s1", + "method": "GET", + "pattern": "/a/x", + "transport": "negotiate" + }, + { + "id": "S25.s2", + "method": "PATCH", + "pattern": "/a/:p1/:p2/:p3", + "transport": "buffer" + }, + { + "id": "S25.s3", + "method": "GET", + "pattern": "/a/:p1/:p2/:p3([0-9a-f]{2})", + "transport": "buffer" + }, + { + "id": "S25.s4", + "method": "GET", + "pattern": "/a/b", + "transport": "buffer" + }, + { + "id": "S25.s5", + "method": "PUT", + "pattern": "/a/:p1(\\d+)/a", + "transport": "buffer" + }, + { + "id": "S25.s6", + "method": "DELETE", + "pattern": "/a/:p1*", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "PUT", + "raw": "/a/x" + }, + { + "method": "GET", + "raw": "/a/b" + }, + { + "method": "PATCH", + "raw": "/a/c/a%20b" + }, + { + "method": "GET", + "raw": "/a/%34%32/a" + }, + { + "method": "PATCH", + "raw": "/a/7" + }, + { + "method": "HEAD", + "raw": "/a/42/b/a" + }, + { + "method": "POST", + "raw": "/a/42/b/" + }, + { + "method": "GET", + "raw": "/a/7/%34%32/a" + }, + { + "method": "OPTIONS", + "raw": "/a/./7/0a/x" + }, + { + "method": "DELETE", + "raw": "/a/b" + }, + { + "method": "GET", + "raw": "/a/b/" + }, + { + "method": "POST", + "raw": "/a" + } + ], + "outcomes": [ + { + "method": "PUT", + "raw": "/a/x", + "normalized": "/a/x", + "match": null, + "resolve": null, + "allow": [ + "GET", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/a/b", + "normalized": "/a/b", + "match": { + "id": "S25.s4", + "params": {} + }, + "resolve": { + "id": "S25.s4", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/a/c/a%20b", + "normalized": "/a/c/a%20b", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/a/%34%32/a", + "normalized": "/a/%34%32/a", + "match": null, + "resolve": null, + "allow": [ + "PUT", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/a/7", + "normalized": "/a/7", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/a/42/b/a", + "normalized": "/a/42/b/a", + "match": null, + "resolve": null, + "allow": [ + "PATCH", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/a/42/b/", + "normalized": "/a/42/b", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/a/7/%34%32/a", + "normalized": "/a/7/%34%32/a", + "match": null, + "resolve": null, + "allow": [ + "PATCH", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/a/./7/0a/x", + "normalized": "/a/7/0a/x", + "match": null, + "resolve": null, + "allow": [ + "PATCH", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/a/b", + "normalized": "/a/b", + "match": { + "id": "S25.s6", + "params": { + "p1": "b" + } + }, + "resolve": { + "id": "S25.s6", + "params": { + "p1": "b" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/a/b/", + "normalized": "/a/b", + "match": { + "id": "S25.s4", + "params": {} + }, + "resolve": { + "id": "S25.s4", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/a", + "normalized": "/a", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + } + ] + }, + { + "id": "S26", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /", + "declarations": [ + { + "id": "S26.s1", + "method": "DELETE", + "pattern": "/c/:p1([0-9a-f]{2})/x", + "transport": "buffer" + }, + { + "id": "S26.s2", + "method": "DELETE", + "pattern": "/:p0/b/:p2", + "transport": "buffer" + }, + { + "id": "S26.s3", + "method": "GET", + "pattern": "/:p0/:p1([0-9a-f]{2})/:p2", + "transport": "buffer" + }, + { + "id": "S26.s4", + "method": "GET", + "pattern": "/:p0/:p1", + "transport": "buffer" + }, + { + "id": "S26.s5", + "method": "PATCH", + "pattern": "/c", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "OPTIONS", + "raw": "/caf%C3%A9/b/a%20b" + }, + { + "method": "DELETE", + "raw": "/%34%32/b/7" + }, + { + "method": "HEAD", + "raw": "/a/caf%C3%A9/a" + }, + { + "method": "PATCH", + "raw": "/q/.." + }, + { + "method": "PUT", + "raw": "/a%20b/./0a/x" + }, + { + "method": "PATCH", + "raw": "/c" + }, + { + "method": "GET", + "raw": "/c/%34%32/a%20b" + }, + { + "method": "HEAD", + "raw": "/c/0a/caf%C3%A9" + }, + { + "method": "DELETE", + "raw": "/42" + }, + { + "method": "PATCH", + "raw": "/c/a%20b/x" + }, + { + "method": "GET", + "raw": "/caf%C3%A9/b/b" + }, + { + "method": "GET", + "raw": "/caf%C3%A9" + } + ], + "outcomes": [ + { + "method": "OPTIONS", + "raw": "/caf%C3%A9/b/a%20b", + "normalized": "/caf%C3%A9/b/a%20b", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/%34%32/b/7", + "normalized": "/%34%32/b/7", + "match": { + "id": "S26.s2", + "params": { + "p0": "42", + "p2": "7" + } + }, + "resolve": { + "id": "S26.s2", + "params": { + "p0": "42", + "p2": "7" + }, + "implicitHead": false + }, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/a/caf%C3%A9/a", + "normalized": "/a/caf%C3%A9/a", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PATCH", + "raw": "/q/..", + "normalized": "/", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PUT", + "raw": "/a%20b/./0a/x", + "normalized": "/a%20b/0a/x", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/c", + "normalized": "/c", + "match": { + "id": "S26.s5", + "params": {} + }, + "resolve": { + "id": "S26.s5", + "params": {}, + "implicitHead": false + }, + "allow": [ + "PATCH", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/c/%34%32/a%20b", + "normalized": "/c/%34%32/a%20b", + "match": { + "id": "S26.s3", + "params": { + "p0": "c", + "p1": "42", + "p2": "a b" + } + }, + "resolve": { + "id": "S26.s3", + "params": { + "p0": "c", + "p1": "42", + "p2": "a b" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/c/0a/caf%C3%A9", + "normalized": "/c/0a/caf%C3%A9", + "match": null, + "resolve": { + "id": "S26.s3", + "params": { + "p0": "c", + "p1": "0a", + "p2": "café" + }, + "implicitHead": true + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/42", + "normalized": "/42", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PATCH", + "raw": "/c/a%20b/x", + "normalized": "/c/a%20b/x", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "GET", + "raw": "/caf%C3%A9/b/b", + "normalized": "/caf%C3%A9/b/b", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/caf%C3%A9", + "normalized": "/caf%C3%A9", + "match": null, + "resolve": null, + "allow": [] + } + ] + }, + { + "id": "S27", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /", + "declarations": [ + { + "id": "S27.s1", + "method": "PUT", + "pattern": "/c/x", + "transport": "buffer" + }, + { + "id": "S27.s2", + "method": "HEAD", + "pattern": "/:p0", + "transport": "buffer" + }, + { + "id": "S27.s3", + "method": "POST", + "pattern": "/b/:p1", + "transport": "buffer" + }, + { + "id": "S27.s4", + "method": "GET", + "pattern": "/:p0*", + "transport": "buffer" + }, + { + "id": "S27.u1", + "method": "HEAD", + "pattern": "/:p0([0-9a-f]{2})", + "transport": "buffer" + }, + { + "id": "S27.u2", + "method": "OPTIONS", + "pattern": "/", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "OPTIONS", + "raw": "/b/x" + }, + { + "method": "PATCH", + "raw": "/b" + }, + { + "method": "GET", + "raw": "/42" + }, + { + "method": "GET", + "raw": "/c/x" + }, + { + "method": "POST", + "raw": "/b/%34%32" + }, + { + "method": "HEAD", + "raw": "/c/x/" + }, + { + "method": "OPTIONS", + "raw": "/c/x" + }, + { + "method": "PUT", + "raw": "/b/42" + }, + { + "method": "HEAD", + "raw": "/b/c/." + }, + { + "method": "HEAD", + "raw": "/0a/q/.." + }, + { + "method": "HEAD", + "raw": "/b/%34%32" + }, + { + "method": "PATCH", + "raw": "/x/caf%C3%A9/42" + } + ], + "outcomes": [ + { + "method": "OPTIONS", + "raw": "/b/x", + "normalized": "/b/x", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/b", + "normalized": "/b", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/42", + "normalized": "/42", + "match": { + "id": "S27.s4", + "params": { + "p0": "42" + } + }, + "resolve": { + "id": "S27.s4", + "params": { + "p0": "42" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/c/x", + "normalized": "/c/x", + "match": { + "id": "S27.s4", + "params": { + "p0": "c/x" + } + }, + "resolve": { + "id": "S27.s4", + "params": { + "p0": "c/x" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "PUT", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/b/%34%32", + "normalized": "/b/%34%32", + "match": { + "id": "S27.s3", + "params": { + "p1": "42" + } + }, + "resolve": { + "id": "S27.s3", + "params": { + "p1": "42" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/c/x/", + "normalized": "/c/x", + "match": null, + "resolve": { + "id": "S27.s4", + "params": { + "p0": "c/x" + }, + "implicitHead": true + }, + "allow": [ + "GET", + "HEAD", + "PUT", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/c/x", + "normalized": "/c/x", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "PUT", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/b/42", + "normalized": "/b/42", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/b/c/.", + "normalized": "/b/c", + "match": null, + "resolve": { + "id": "S27.s4", + "params": { + "p0": "b/c" + }, + "implicitHead": true + }, + "allow": [ + "GET", + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/0a/q/..", + "normalized": "/0a", + "match": { + "id": "S27.u1", + "params": { + "p0": "0a" + } + }, + "resolve": { + "id": "S27.u1", + "params": { + "p0": "0a" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/b/%34%32", + "normalized": "/b/%34%32", + "match": null, + "resolve": { + "id": "S27.s4", + "params": { + "p0": "b/42" + }, + "implicitHead": true + }, + "allow": [ + "GET", + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/x/caf%C3%A9/42", + "normalized": "/x/caf%C3%A9/42", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + } + ] + }, + { + "id": "S28", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /c", + "declarations": [ + { + "id": "S28.s1", + "method": "OPTIONS", + "pattern": "/c/c/c", + "transport": "buffer" + }, + { + "id": "S28.s2", + "method": "GET", + "pattern": "/c/:p1", + "transport": "negotiate" + }, + { + "id": "S28.s3", + "method": "PUT", + "pattern": "/c/a/a", + "transport": "buffer" + }, + { + "id": "S28.s4", + "method": "PATCH", + "pattern": "/c/:p1*", + "transport": "buffer" + }, + { + "id": "S28.u1", + "method": "HEAD", + "pattern": "/b/:p1*", + "transport": "buffer" + }, + { + "id": "S28.u2", + "method": "POST", + "pattern": "/:p0/:p1", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/c/42/x" + }, + { + "method": "PUT", + "raw": "/c/a/a" + }, + { + "method": "GET", + "raw": "/c/b/" + }, + { + "method": "GET", + "raw": "/c/a/a/" + }, + { + "method": "GET", + "raw": "/c/a" + }, + { + "method": "GET", + "raw": "/c/ff/" + }, + { + "method": "DELETE", + "raw": "/c/./%34%32" + }, + { + "method": "HEAD", + "raw": "/c/x" + }, + { + "method": "HEAD", + "raw": "/c/c/c" + }, + { + "method": "POST", + "raw": "/c/a/7" + }, + { + "method": "PATCH", + "raw": "/c/a/" + }, + { + "method": "HEAD", + "raw": "/c/a" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/c/42/x", + "normalized": "/c/42/x", + "match": null, + "resolve": null, + "allow": [ + "PATCH", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/c/a/a", + "normalized": "/c/a/a", + "match": { + "id": "S28.s3", + "params": {} + }, + "resolve": { + "id": "S28.s3", + "params": {}, + "implicitHead": false + }, + "allow": [ + "PUT", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/c/b/", + "normalized": "/c/b", + "match": { + "id": "S28.s2", + "params": { + "p1": "b" + } + }, + "resolve": { + "id": "S28.s2", + "params": { + "p1": "b" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "POST", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/c/a/a/", + "normalized": "/c/a/a", + "match": null, + "resolve": null, + "allow": [ + "PUT", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/c/a", + "normalized": "/c/a", + "match": { + "id": "S28.s2", + "params": { + "p1": "a" + } + }, + "resolve": { + "id": "S28.s2", + "params": { + "p1": "a" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "POST", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/c/ff/", + "normalized": "/c/ff", + "match": { + "id": "S28.s2", + "params": { + "p1": "ff" + } + }, + "resolve": { + "id": "S28.s2", + "params": { + "p1": "ff" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "POST", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/c/./%34%32", + "normalized": "/c/%34%32", + "match": null, + "resolve": null, + "allow": [ + "GET", + "POST", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/c/x", + "normalized": "/c/x", + "match": null, + "resolve": null, + "allow": [ + "GET", + "POST", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/c/c/c", + "normalized": "/c/c/c", + "match": null, + "resolve": null, + "allow": [ + "PATCH", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/c/a/7", + "normalized": "/c/a/7", + "match": null, + "resolve": null, + "allow": [ + "PATCH", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/c/a/", + "normalized": "/c/a", + "match": { + "id": "S28.s4", + "params": { + "p1": "a" + } + }, + "resolve": { + "id": "S28.s4", + "params": { + "p1": "a" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "POST", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/c/a", + "normalized": "/c/a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "POST", + "PATCH", + "OPTIONS" + ] + } + ] + }, + { + "id": "S29", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /x", + "declarations": [ + { + "id": "S29.s1", + "method": "GET", + "pattern": "/x/a/:p2", + "transport": "buffer" + }, + { + "id": "S29.s2", + "method": "PUT", + "pattern": "/x/:p1/a/:p3(\\d+)", + "transport": "buffer" + }, + { + "id": "S29.s3", + "method": "HEAD", + "pattern": "/x/:p1/:p2/:p3([a-c]+)", + "transport": "buffer" + }, + { + "id": "S29.s4", + "method": "POST", + "pattern": "/x/:p1/:p2/:p3", + "transport": "buffer" + }, + { + "id": "S29.u1", + "method": "DELETE", + "pattern": "/x", + "transport": "buffer" + }, + { + "id": "S29.u2", + "method": "GET", + "pattern": "/x/:p1(\\d+)/c", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "HEAD", + "raw": "/x" + }, + { + "method": "DELETE", + "raw": "/x/%34%32/7/" + }, + { + "method": "PATCH", + "raw": "/x/caf%C3%A9/a/0a/" + }, + { + "method": "HEAD", + "raw": "/x/ff/a/./caf%C3%A9" + }, + { + "method": "GET", + "raw": "/x/7/a%20b" + }, + { + "method": "DELETE", + "raw": "/q/../x/%34%32/a/0a" + }, + { + "method": "OPTIONS", + "raw": "/x/7/x/42" + }, + { + "method": "OPTIONS", + "raw": "/x/a/a%20b" + }, + { + "method": "GET", + "raw": "/x/0a/b/x" + }, + { + "method": "PATCH", + "raw": "/x/42/%34%32/c" + }, + { + "method": "OPTIONS", + "raw": "/x/a%20b/c/./7" + }, + { + "method": "DELETE", + "raw": "/x" + } + ], + "outcomes": [ + { + "method": "HEAD", + "raw": "/x", + "normalized": "/x", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/x/%34%32/7/", + "normalized": "/x/%34%32/7", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PATCH", + "raw": "/x/caf%C3%A9/a/0a/", + "normalized": "/x/caf%C3%A9/a/0a", + "match": null, + "resolve": null, + "allow": [ + "POST", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/x/ff/a/./caf%C3%A9", + "normalized": "/x/ff/a/caf%C3%A9", + "match": null, + "resolve": null, + "allow": [ + "POST", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/x/7/a%20b", + "normalized": "/x/7/a%20b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "DELETE", + "raw": "/q/../x/%34%32/a/0a", + "normalized": "/x/%34%32/a/0a", + "match": null, + "resolve": null, + "allow": [ + "POST", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/x/7/x/42", + "normalized": "/x/7/x/42", + "match": null, + "resolve": null, + "allow": [ + "POST", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/x/a/a%20b", + "normalized": "/x/a/a%20b", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/x/0a/b/x", + "normalized": "/x/0a/b/x", + "match": null, + "resolve": null, + "allow": [ + "POST", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/x/42/%34%32/c", + "normalized": "/x/42/%34%32/c", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/x/a%20b/c/./7", + "normalized": "/x/a%20b/c/7", + "match": null, + "resolve": null, + "allow": [ + "POST", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/x", + "normalized": "/x", + "match": { + "id": "S29.u1", + "params": {} + }, + "resolve": { + "id": "S29.u1", + "params": {}, + "implicitHead": false + }, + "allow": [ + "DELETE", + "OPTIONS" + ] + } + ] + }, + { + "id": "S30", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /a/a", + "declarations": [ + { + "id": "S30.s1", + "method": "GET", + "pattern": "/a/a/c/c", + "transport": "buffer" + }, + { + "id": "S30.s2", + "method": "HEAD", + "pattern": "/a/a/:p2([a-c]+)", + "transport": "buffer" + }, + { + "id": "S30.s3", + "method": "GET", + "pattern": "/a/a/:p2(\\d+)", + "transport": "buffer" + }, + { + "id": "S30.u1", + "method": "GET", + "pattern": "/c", + "transport": "sse" + }, + { + "id": "S30.u2", + "method": "GET", + "pattern": "/", + "transport": "buffer" + }, + { + "id": "S30.u3", + "method": "GET", + "pattern": "/:p0([0-9a-f]{2})/c", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "OPTIONS", + "raw": "/q/../a/a/42/caf%C3%A9" + }, + { + "method": "POST", + "raw": "/a/a/a" + }, + { + "method": "DELETE", + "raw": "//a/a/c/c" + }, + { + "method": "PUT", + "raw": "/a/a/c" + }, + { + "method": "GET", + "raw": "/./a/a/c/c" + }, + { + "method": "OPTIONS", + "raw": "/a/a/c/c" + }, + { + "method": "GET", + "raw": "/./a/a/b" + }, + { + "method": "GET", + "raw": "/a/a/b/" + }, + { + "method": "HEAD", + "raw": "/a/a/c" + }, + { + "method": "HEAD", + "raw": "/a/a/7/" + }, + { + "method": "DELETE", + "raw": "/a/a/0a" + }, + { + "method": "DELETE", + "raw": "/a/a/%34%32/" + } + ], + "outcomes": [ + { + "method": "OPTIONS", + "raw": "/q/../a/a/42/caf%C3%A9", + "normalized": "/a/a/42/caf%C3%A9", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "POST", + "raw": "/a/a/a", + "normalized": "/a/a/a", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "//a/a/c/c", + "error": { + "name": "InvalidRequestPathError", + "message": "invalid request path: repeated slash" + } + }, + { + "method": "PUT", + "raw": "/a/a/c", + "normalized": "/a/a/c", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/./a/a/c/c", + "normalized": "/a/a/c/c", + "match": { + "id": "S30.s1", + "params": {} + }, + "resolve": { + "id": "S30.s1", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/a/a/c/c", + "normalized": "/a/a/c/c", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/./a/a/b", + "normalized": "/a/a/b", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/a/a/b/", + "normalized": "/a/a/b", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/a/a/c", + "normalized": "/a/a/c", + "match": { + "id": "S30.s2", + "params": { + "p2": "c" + } + }, + "resolve": { + "id": "S30.s2", + "params": { + "p2": "c" + }, + "implicitHead": false + }, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/a/a/7/", + "normalized": "/a/a/7", + "match": null, + "resolve": { + "id": "S30.s3", + "params": { + "p2": "7" + }, + "implicitHead": true + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/a/a/0a", + "normalized": "/a/a/0a", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "DELETE", + "raw": "/a/a/%34%32/", + "normalized": "/a/a/%34%32", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + } + ] + }, + { + "id": "S31", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /b/x/x", + "declarations": [ + { + "id": "S31.s1", + "method": "HEAD", + "pattern": "/b/x/x/x/c/c", + "transport": "buffer" + }, + { + "id": "S31.s2", + "method": "PATCH", + "pattern": "/b/x/x/:p3/c", + "transport": "buffer" + }, + { + "id": "S31.s3", + "method": "GET", + "pattern": "/b/x/x/b", + "transport": "buffer" + }, + { + "id": "S31.u1", + "method": "OPTIONS", + "pattern": "/:p0/:p1/x/:p3*", + "transport": "buffer" + }, + { + "id": "S31.u2", + "method": "PUT", + "pattern": "/c/:p1(\\d+)", + "transport": "buffer" + }, + { + "id": "S31.u3", + "method": "PUT", + "pattern": "/", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/b/x/x/c/0a" + }, + { + "method": "PATCH", + "raw": "/b/x/x/x/c/c" + }, + { + "method": "POST", + "raw": "/b/x/x/c/c" + }, + { + "method": "GET", + "raw": "/b/x/x/x" + }, + { + "method": "PUT", + "raw": "/b/x/x/b/c" + }, + { + "method": "HEAD", + "raw": "/b/x/x/c" + }, + { + "method": "GET", + "raw": "/b/x/x/42/c" + }, + { + "method": "POST", + "raw": "/b/x/x/c/ff/ff/" + }, + { + "method": "PUT", + "raw": "/b/x/x/caf%C3%A9/a%20b" + }, + { + "method": "POST", + "raw": "/b/x/x/42/c" + }, + { + "method": "DELETE", + "raw": "/b/x/x/b/." + }, + { + "method": "GET", + "raw": "/b/x/x/c" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/b/x/x/c/0a", + "normalized": "/b/x/x/c/0a", + "match": null, + "resolve": null, + "allow": [ + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/b/x/x/x/c/c", + "normalized": "/b/x/x/x/c/c", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/b/x/x/c/c", + "normalized": "/b/x/x/c/c", + "match": null, + "resolve": null, + "allow": [ + "PATCH", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/b/x/x/x", + "normalized": "/b/x/x/x", + "match": null, + "resolve": null, + "allow": [ + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/b/x/x/b/c", + "normalized": "/b/x/x/b/c", + "match": null, + "resolve": null, + "allow": [ + "PATCH", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/b/x/x/c", + "normalized": "/b/x/x/c", + "match": null, + "resolve": null, + "allow": [ + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/b/x/x/42/c", + "normalized": "/b/x/x/42/c", + "match": null, + "resolve": null, + "allow": [ + "PATCH", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/b/x/x/c/ff/ff/", + "normalized": "/b/x/x/c/ff/ff", + "match": null, + "resolve": null, + "allow": [ + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/b/x/x/caf%C3%A9/a%20b", + "normalized": "/b/x/x/caf%C3%A9/a%20b", + "match": null, + "resolve": null, + "allow": [ + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/b/x/x/42/c", + "normalized": "/b/x/x/42/c", + "match": null, + "resolve": null, + "allow": [ + "PATCH", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/b/x/x/b/.", + "normalized": "/b/x/x/b", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/b/x/x/c", + "normalized": "/b/x/x/c", + "match": null, + "resolve": null, + "allow": [ + "OPTIONS" + ] + } + ] + }, + { + "id": "S32", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /", + "declarations": [ + { + "id": "S32.s1", + "method": "HEAD", + "pattern": "/a", + "transport": "buffer" + }, + { + "id": "S32.s2", + "method": "DELETE", + "pattern": "/:p0/c", + "transport": "buffer" + }, + { + "id": "S32.s3", + "method": "GET", + "pattern": "/a", + "transport": "buffer" + }, + { + "id": "S32.u1", + "method": "PATCH", + "pattern": "/a/:p1([a-c]+)/:p2", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "HEAD", + "raw": "/caf%C3%A9/7" + }, + { + "method": "OPTIONS", + "raw": "/x/c" + }, + { + "method": "HEAD", + "raw": "//a" + }, + { + "method": "OPTIONS", + "raw": "/a" + }, + { + "method": "PATCH", + "raw": "/0a/c" + }, + { + "method": "GET", + "raw": "/a" + }, + { + "method": "DELETE", + "raw": "/a/" + }, + { + "method": "DELETE", + "raw": "/a" + }, + { + "method": "PUT", + "raw": "/a" + }, + { + "method": "PUT", + "raw": "/%34%32" + }, + { + "method": "GET", + "raw": "/./a" + }, + { + "method": "GET", + "raw": "/a" + } + ], + "outcomes": [ + { + "method": "HEAD", + "raw": "/caf%C3%A9/7", + "normalized": "/caf%C3%A9/7", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "OPTIONS", + "raw": "/x/c", + "normalized": "/x/c", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "//a", + "error": { + "name": "InvalidRequestPathError", + "message": "invalid request path: repeated slash" + } + }, + { + "method": "OPTIONS", + "raw": "/a", + "normalized": "/a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/0a/c", + "normalized": "/0a/c", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/a", + "normalized": "/a", + "match": { + "id": "S32.s3", + "params": {} + }, + "resolve": { + "id": "S32.s3", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/a/", + "normalized": "/a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/a", + "normalized": "/a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/a", + "normalized": "/a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/%34%32", + "normalized": "/%34%32", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "GET", + "raw": "/./a", + "normalized": "/a", + "match": { + "id": "S32.s3", + "params": {} + }, + "resolve": { + "id": "S32.s3", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/a", + "normalized": "/a", + "match": { + "id": "S32.s3", + "params": {} + }, + "resolve": { + "id": "S32.s3", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + } + ] + }, + { + "id": "S33", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /c/x", + "declarations": [ + { + "id": "S33.s1", + "method": "PATCH", + "pattern": "/c/x/x/:p3([a-c]+)", + "transport": "buffer" + }, + { + "id": "S33.s2", + "method": "GET", + "pattern": "/c/x/:p2", + "transport": "sse" + }, + { + "id": "S33.s3", + "method": "GET", + "pattern": "/c/x/x/:p3([a-c]+)", + "transport": "negotiate" + }, + { + "id": "S33.s4", + "method": "PUT", + "pattern": "/c/x/b/:p3(\\d+)", + "transport": "buffer" + }, + { + "id": "S33.s5", + "method": "HEAD", + "pattern": "/c/x/a/:p3/b", + "transport": "buffer" + }, + { + "id": "S33.u1", + "method": "GET", + "pattern": "/", + "transport": "buffer" + }, + { + "id": "S33.u2", + "method": "GET", + "pattern": "/:p0", + "transport": "buffer" + }, + { + "id": "S33.u3", + "method": "GET", + "pattern": "/", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/c/x/b/caf%C3%A9" + }, + { + "method": "PUT", + "raw": "/c/x/a/caf%C3%A9/b" + }, + { + "method": "PUT", + "raw": "/c/x/x/ff" + }, + { + "method": "PUT", + "raw": "/c/x/x/b" + }, + { + "method": "DELETE", + "raw": "/c/./x/a/a%20b/b" + }, + { + "method": "HEAD", + "raw": "/c/x" + }, + { + "method": "PUT", + "raw": "//c/x/c" + }, + { + "method": "PATCH", + "raw": "/c/x/b/42" + }, + { + "method": "GET", + "raw": "/c/x/x/7" + }, + { + "method": "POST", + "raw": "/c/x/a/x" + }, + { + "method": "OPTIONS", + "raw": "/c/x/./a%20b/c/a%20b" + }, + { + "method": "DELETE", + "raw": "/c/x/a" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/c/x/b/caf%C3%A9", + "normalized": "/c/x/b/caf%C3%A9", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PUT", + "raw": "/c/x/a/caf%C3%A9/b", + "normalized": "/c/x/a/caf%C3%A9/b", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/c/x/x/ff", + "normalized": "/c/x/x/ff", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PUT", + "raw": "/c/x/x/b", + "normalized": "/c/x/x/b", + "match": null, + "resolve": null, + "allow": [ + "GET", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/c/./x/a/a%20b/b", + "normalized": "/c/x/a/a%20b/b", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/c/x", + "normalized": "/c/x", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PUT", + "raw": "//c/x/c", + "error": { + "name": "InvalidRequestPathError", + "message": "invalid request path: repeated slash" + } + }, + { + "method": "PATCH", + "raw": "/c/x/b/42", + "normalized": "/c/x/b/42", + "match": null, + "resolve": null, + "allow": [ + "PUT", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/c/x/x/7", + "normalized": "/c/x/x/7", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "POST", + "raw": "/c/x/a/x", + "normalized": "/c/x/a/x", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "OPTIONS", + "raw": "/c/x/./a%20b/c/a%20b", + "normalized": "/c/x/a%20b/c/a%20b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "DELETE", + "raw": "/c/x/a", + "normalized": "/c/x/a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "OPTIONS" + ] + } + ] + }, + { + "id": "S34", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /c/c/b", + "declarations": [ + { + "id": "S34.s1", + "method": "OPTIONS", + "pattern": "/c/c/b/b/b", + "transport": "buffer" + }, + { + "id": "S34.s2", + "method": "OPTIONS", + "pattern": "/c/c/b/:p3(\\d+)/c/:p5(\\d+)", + "transport": "buffer" + }, + { + "id": "S34.s3", + "method": "GET", + "pattern": "/c/c/b/x/b", + "transport": "buffer" + }, + { + "id": "S34.s4", + "method": "DELETE", + "pattern": "/c/c/b/a/b/:p5(\\d+)", + "transport": "buffer" + }, + { + "id": "S34.u1", + "method": "OPTIONS", + "pattern": "/:p0([0-9a-f]{2})", + "transport": "buffer" + }, + { + "id": "S34.u2", + "method": "POST", + "pattern": "/c/:p1/:p2*", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/c/c/b/b/b" + }, + { + "method": "GET", + "raw": "/c/c/b/a/a" + }, + { + "method": "DELETE", + "raw": "/c/c/b/b/b" + }, + { + "method": "PUT", + "raw": "/c/c/b/x/b" + }, + { + "method": "POST", + "raw": "/c/c/b/b/./b" + }, + { + "method": "DELETE", + "raw": "/c/c/b/x/c/42/" + }, + { + "method": "GET", + "raw": "/c/c/b/a/b/%34%32/" + }, + { + "method": "GET", + "raw": "/c/c/b/a/b" + }, + { + "method": "DELETE", + "raw": "//c/c/b/b/b/" + }, + { + "method": "PATCH", + "raw": "/c/c/b" + }, + { + "method": "OPTIONS", + "raw": "/c/c/b/b/c/c" + }, + { + "method": "OPTIONS", + "raw": "/c/c/b/x/b" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/c/c/b/b/b", + "normalized": "/c/c/b/b/b", + "match": null, + "resolve": null, + "allow": [ + "POST", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/c/c/b/a/a", + "normalized": "/c/c/b/a/a", + "match": null, + "resolve": null, + "allow": [ + "POST", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/c/c/b/b/b", + "normalized": "/c/c/b/b/b", + "match": null, + "resolve": null, + "allow": [ + "POST", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/c/c/b/x/b", + "normalized": "/c/c/b/x/b", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/c/c/b/b/./b", + "normalized": "/c/c/b/b/b", + "match": { + "id": "S34.u2", + "params": { + "p1": "c", + "p2": "b/b/b" + } + }, + "resolve": { + "id": "S34.u2", + "params": { + "p1": "c", + "p2": "b/b/b" + }, + "implicitHead": false + }, + "allow": [ + "POST", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/c/c/b/x/c/42/", + "normalized": "/c/c/b/x/c/42", + "match": null, + "resolve": null, + "allow": [ + "POST", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/c/c/b/a/b/%34%32/", + "normalized": "/c/c/b/a/b/%34%32", + "match": null, + "resolve": null, + "allow": [ + "POST", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/c/c/b/a/b", + "normalized": "/c/c/b/a/b", + "match": null, + "resolve": null, + "allow": [ + "POST", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "//c/c/b/b/b/", + "error": { + "name": "InvalidRequestPathError", + "message": "invalid request path: repeated slash" + } + }, + { + "method": "PATCH", + "raw": "/c/c/b", + "normalized": "/c/c/b", + "match": null, + "resolve": null, + "allow": [ + "POST", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/c/c/b/b/c/c", + "normalized": "/c/c/b/b/c/c", + "match": null, + "resolve": null, + "allow": [ + "POST", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/c/c/b/x/b", + "normalized": "/c/c/b/x/b", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "POST", + "OPTIONS" + ] + } + ] + }, + { + "id": "S35", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /b", + "declarations": [ + { + "id": "S35.s1", + "method": "GET", + "pattern": "/b/a/b", + "transport": "buffer" + }, + { + "id": "S35.s2", + "method": "GET", + "pattern": "/b/:p1([a-c]+)", + "transport": "buffer" + }, + { + "id": "S35.s3", + "method": "PUT", + "pattern": "/b/b/x", + "transport": "buffer" + }, + { + "id": "S35.s4", + "method": "GET", + "pattern": "/b/:p1(\\d+)/x/c", + "transport": "buffer" + }, + { + "id": "S35.u1", + "method": "DELETE", + "pattern": "/:p0*", + "transport": "buffer" + }, + { + "id": "S35.u2", + "method": "POST", + "pattern": "/b", + "transport": "buffer" + }, + { + "id": "S35.u3", + "method": "GET", + "pattern": "/:p0([a-c]+)/:p1/b", + "transport": "negotiate" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/b/a%20b/x/c" + }, + { + "method": "POST", + "raw": "/b/b/x" + }, + { + "method": "OPTIONS", + "raw": "/b/a/b" + }, + { + "method": "GET", + "raw": "/b/a/b" + }, + { + "method": "POST", + "raw": "/b/b" + }, + { + "method": "OPTIONS", + "raw": "/b/c/" + }, + { + "method": "DELETE", + "raw": "/b/a%20b/x/c/" + }, + { + "method": "HEAD", + "raw": "/b/a/b" + }, + { + "method": "OPTIONS", + "raw": "/b/7" + }, + { + "method": "GET", + "raw": "/b/a/x/c" + }, + { + "method": "DELETE", + "raw": "/b/a" + }, + { + "method": "GET", + "raw": "/b/7/x/c" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/b/a%20b/x/c", + "normalized": "/b/a%20b/x/c", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/b/b/x", + "normalized": "/b/b/x", + "match": null, + "resolve": null, + "allow": [ + "PUT", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/b/a/b", + "normalized": "/b/a/b", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/b/a/b", + "normalized": "/b/a/b", + "match": { + "id": "S35.s1", + "params": {} + }, + "resolve": { + "id": "S35.s1", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/b/b", + "normalized": "/b/b", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/b/c/", + "normalized": "/b/c", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/b/a%20b/x/c/", + "normalized": "/b/a%20b/x/c", + "match": { + "id": "S35.u1", + "params": { + "p0": "b/a b/x/c" + } + }, + "resolve": { + "id": "S35.u1", + "params": { + "p0": "b/a b/x/c" + }, + "implicitHead": false + }, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/b/a/b", + "normalized": "/b/a/b", + "match": null, + "resolve": { + "id": "S35.s1", + "params": {}, + "implicitHead": true + }, + "allow": [ + "GET", + "HEAD", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/b/7", + "normalized": "/b/7", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/b/a/x/c", + "normalized": "/b/a/x/c", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/b/a", + "normalized": "/b/a", + "match": { + "id": "S35.u1", + "params": { + "p0": "b/a" + } + }, + "resolve": { + "id": "S35.u1", + "params": { + "p0": "b/a" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/b/7/x/c", + "normalized": "/b/7/x/c", + "match": { + "id": "S35.s4", + "params": { + "p1": "7" + } + }, + "resolve": { + "id": "S35.s4", + "params": { + "p1": "7" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "DELETE", + "OPTIONS" + ] + } + ] + }, + { + "id": "S36", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /x", + "declarations": [ + { + "id": "S36.s1", + "method": "POST", + "pattern": "/x/a/:p2", + "transport": "buffer" + }, + { + "id": "S36.s2", + "method": "GET", + "pattern": "/x/:p1/:p2([a-c]+)", + "transport": "sse" + }, + { + "id": "S36.s3", + "method": "HEAD", + "pattern": "/x/a/b", + "transport": "buffer" + }, + { + "id": "S36.s4", + "method": "GET", + "pattern": "/x/:p1*", + "transport": "buffer" + }, + { + "id": "S36.s5", + "method": "PUT", + "pattern": "/x/c/:p2(\\d+)", + "transport": "buffer" + }, + { + "id": "S36.s6", + "method": "PATCH", + "pattern": "/x/:p1/x/:p3", + "transport": "buffer" + }, + { + "id": "S36.u1", + "method": "OPTIONS", + "pattern": "/c/:p1/:p2([0-9a-f]{2})", + "transport": "buffer" + }, + { + "id": "S36.u2", + "method": "PUT", + "pattern": "/:p0([a-c]+)/:p1", + "transport": "buffer" + }, + { + "id": "S36.u3", + "method": "PUT", + "pattern": "/:p0(\\d+)", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/x/0a/b/ff/" + }, + { + "method": "GET", + "raw": "/x/a/42" + }, + { + "method": "PUT", + "raw": "/x/a" + }, + { + "method": "OPTIONS", + "raw": "/x/" + }, + { + "method": "HEAD", + "raw": "/x/a/a%20b" + }, + { + "method": "POST", + "raw": "/x/a/b/" + }, + { + "method": "HEAD", + "raw": "/x/a/a%20b" + }, + { + "method": "HEAD", + "raw": "/x/caf%C3%A9/x/%34%32" + }, + { + "method": "HEAD", + "raw": "//x/a/42" + }, + { + "method": "HEAD", + "raw": "/x/c/c" + }, + { + "method": "PATCH", + "raw": "/x/b/./a" + }, + { + "method": "PATCH", + "raw": "/x/a/" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/x/0a/b/ff/", + "normalized": "/x/0a/b/ff", + "match": { + "id": "S36.s4", + "params": { + "p1": "0a/b/ff" + } + }, + "resolve": { + "id": "S36.s4", + "params": { + "p1": "0a/b/ff" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/x/a/42", + "normalized": "/x/a/42", + "match": { + "id": "S36.s4", + "params": { + "p1": "a/42" + } + }, + "resolve": { + "id": "S36.s4", + "params": { + "p1": "a/42" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/x/a", + "normalized": "/x/a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/x/", + "normalized": "/x", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/x/a/a%20b", + "normalized": "/x/a/a%20b", + "match": null, + "resolve": { + "id": "S36.s4", + "params": { + "p1": "a/a b" + }, + "implicitHead": true + }, + "allow": [ + "GET", + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/x/a/b/", + "normalized": "/x/a/b", + "match": { + "id": "S36.s1", + "params": { + "p2": "b" + } + }, + "resolve": { + "id": "S36.s1", + "params": { + "p2": "b" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/x/a/a%20b", + "normalized": "/x/a/a%20b", + "match": null, + "resolve": { + "id": "S36.s4", + "params": { + "p1": "a/a b" + }, + "implicitHead": true + }, + "allow": [ + "GET", + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/x/caf%C3%A9/x/%34%32", + "normalized": "/x/caf%C3%A9/x/%34%32", + "match": null, + "resolve": { + "id": "S36.s4", + "params": { + "p1": "café/x/42" + }, + "implicitHead": true + }, + "allow": [ + "GET", + "HEAD", + "PATCH", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "//x/a/42", + "error": { + "name": "InvalidRequestPathError", + "message": "invalid request path: repeated slash" + } + }, + { + "method": "HEAD", + "raw": "/x/c/c", + "normalized": "/x/c/c", + "match": null, + "resolve": { + "id": "S36.s4", + "params": { + "p1": "c/c" + }, + "implicitHead": true + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/x/b/./a", + "normalized": "/x/b/a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/x/a/", + "normalized": "/x/a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + } + ] + }, + { + "id": "S37", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /", + "declarations": [ + { + "id": "S37.s1", + "method": "OPTIONS", + "pattern": "/a", + "transport": "buffer" + }, + { + "id": "S37.s2", + "method": "GET", + "pattern": "/:p0/:p1", + "transport": "buffer" + }, + { + "id": "S37.s3", + "method": "DELETE", + "pattern": "/:p0/c/x", + "transport": "buffer" + }, + { + "id": "S37.s4", + "method": "PUT", + "pattern": "/:p0/:p1/:p2([0-9a-f]{2})", + "transport": "buffer" + }, + { + "id": "S37.s5", + "method": "GET", + "pattern": "/c/:p1", + "transport": "buffer" + }, + { + "id": "S37.u1", + "method": "PATCH", + "pattern": "/c", + "transport": "buffer" + }, + { + "id": "S37.u2", + "method": "PATCH", + "pattern": "/", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "PUT", + "raw": "/a" + }, + { + "method": "GET", + "raw": "/" + }, + { + "method": "GET", + "raw": "/c/a" + }, + { + "method": "GET", + "raw": "/b/caf%C3%A9/c/." + }, + { + "method": "POST", + "raw": "/caf%C3%A9/c/x" + }, + { + "method": "DELETE", + "raw": "/c/%34%32/a%20b" + }, + { + "method": "HEAD", + "raw": "/a%20b/a%20b/ff/" + }, + { + "method": "GET", + "raw": "/b/0a" + }, + { + "method": "GET", + "raw": "/b/a%20b/" + }, + { + "method": "GET", + "raw": "/c/a/a" + }, + { + "method": "GET", + "raw": "/a%20b/c/" + }, + { + "method": "OPTIONS", + "raw": "/42/x/b" + } + ], + "outcomes": [ + { + "method": "PUT", + "raw": "/a", + "normalized": "/a", + "match": null, + "resolve": null, + "allow": [ + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/", + "normalized": "/", + "match": null, + "resolve": null, + "allow": [ + "PATCH", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/c/a", + "normalized": "/c/a", + "match": { + "id": "S37.s5", + "params": { + "p1": "a" + } + }, + "resolve": { + "id": "S37.s5", + "params": { + "p1": "a" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/b/caf%C3%A9/c/.", + "normalized": "/b/caf%C3%A9/c", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "POST", + "raw": "/caf%C3%A9/c/x", + "normalized": "/caf%C3%A9/c/x", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/c/%34%32/a%20b", + "normalized": "/c/%34%32/a%20b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "HEAD", + "raw": "/a%20b/a%20b/ff/", + "normalized": "/a%20b/a%20b/ff", + "match": null, + "resolve": null, + "allow": [ + "PUT", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/b/0a", + "normalized": "/b/0a", + "match": { + "id": "S37.s2", + "params": { + "p0": "b", + "p1": "0a" + } + }, + "resolve": { + "id": "S37.s2", + "params": { + "p0": "b", + "p1": "0a" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/b/a%20b/", + "normalized": "/b/a%20b", + "match": { + "id": "S37.s2", + "params": { + "p0": "b", + "p1": "a b" + } + }, + "resolve": { + "id": "S37.s2", + "params": { + "p0": "b", + "p1": "a b" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/c/a/a", + "normalized": "/c/a/a", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "GET", + "raw": "/a%20b/c/", + "normalized": "/a%20b/c", + "match": { + "id": "S37.s2", + "params": { + "p0": "a b", + "p1": "c" + } + }, + "resolve": { + "id": "S37.s2", + "params": { + "p0": "a b", + "p1": "c" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/42/x/b", + "normalized": "/42/x/b", + "match": null, + "resolve": null, + "allow": [] + } + ] + }, + { + "id": "S38", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /x/b/b", + "declarations": [ + { + "id": "S38.s1", + "method": "GET", + "pattern": "/x/b/b/a/:p4(\\d+)/:p5([0-9a-f]{2})", + "transport": "buffer" + }, + { + "id": "S38.s2", + "method": "OPTIONS", + "pattern": "/x/b/b/:p3/c", + "transport": "buffer" + }, + { + "id": "S38.s3", + "method": "GET", + "pattern": "/x/b/b/:p3", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "GET", + "raw": "//x/b/b/42" + }, + { + "method": "DELETE", + "raw": "/x/b/q/../b/a" + }, + { + "method": "GET", + "raw": "/x/b/b/a" + }, + { + "method": "OPTIONS", + "raw": "/x/b/b/a/a/7" + }, + { + "method": "POST", + "raw": "/x/b/./b/a/b/x" + }, + { + "method": "OPTIONS", + "raw": "/x/b/b" + }, + { + "method": "DELETE", + "raw": "/x/b/b/a/a%20b/c" + }, + { + "method": "PATCH", + "raw": "/x/b/b/0a" + }, + { + "method": "GET", + "raw": "/x/b/b/a/42/a" + }, + { + "method": "GET", + "raw": "/x/b/b/b" + }, + { + "method": "OPTIONS", + "raw": "/x/b/b" + }, + { + "method": "GET", + "raw": "/x/b/b/c/b" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "//x/b/b/42", + "error": { + "name": "InvalidRequestPathError", + "message": "invalid request path: repeated slash" + } + }, + { + "method": "DELETE", + "raw": "/x/b/q/../b/a", + "normalized": "/x/b/b/a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/x/b/b/a", + "normalized": "/x/b/b/a", + "match": { + "id": "S38.s3", + "params": { + "p3": "a" + } + }, + "resolve": { + "id": "S38.s3", + "params": { + "p3": "a" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/x/b/b/a/a/7", + "normalized": "/x/b/b/a/a/7", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "POST", + "raw": "/x/b/./b/a/b/x", + "normalized": "/x/b/b/a/b/x", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "OPTIONS", + "raw": "/x/b/b", + "normalized": "/x/b/b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "DELETE", + "raw": "/x/b/b/a/a%20b/c", + "normalized": "/x/b/b/a/a%20b/c", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PATCH", + "raw": "/x/b/b/0a", + "normalized": "/x/b/b/0a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/x/b/b/a/42/a", + "normalized": "/x/b/b/a/42/a", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "GET", + "raw": "/x/b/b/b", + "normalized": "/x/b/b/b", + "match": { + "id": "S38.s3", + "params": { + "p3": "b" + } + }, + "resolve": { + "id": "S38.s3", + "params": { + "p3": "b" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/x/b/b", + "normalized": "/x/b/b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "GET", + "raw": "/x/b/b/c/b", + "normalized": "/x/b/b/c/b", + "match": null, + "resolve": null, + "allow": [] + } + ] + }, + { + "id": "S39", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /b/b/a", + "declarations": [ + { + "id": "S39.s1", + "method": "OPTIONS", + "pattern": "/b/b/a/c", + "transport": "buffer" + }, + { + "id": "S39.s2", + "method": "GET", + "pattern": "/b/b/a/:p3", + "transport": "negotiate" + }, + { + "id": "S39.s3", + "method": "OPTIONS", + "pattern": "/b/b/a/:p3(\\d+)", + "transport": "buffer" + }, + { + "id": "S39.s4", + "method": "GET", + "pattern": "/b/b/a/:p3([a-c]+)", + "transport": "buffer" + }, + { + "id": "S39.s5", + "method": "GET", + "pattern": "/b/b/a/:p3*", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "OPTIONS", + "raw": "/b/b/a/x" + }, + { + "method": "DELETE", + "raw": "/b/b/a/b/" + }, + { + "method": "PUT", + "raw": "//b/b/a/ff" + }, + { + "method": "GET", + "raw": "/b/b/a/a" + }, + { + "method": "OPTIONS", + "raw": "/b/b/a/c" + }, + { + "method": "PATCH", + "raw": "/b/b/a/a/x/42" + }, + { + "method": "PATCH", + "raw": "/b/b/a" + }, + { + "method": "DELETE", + "raw": "/b/b/a/c" + }, + { + "method": "OPTIONS", + "raw": "/b/b/a/0a" + }, + { + "method": "OPTIONS", + "raw": "//b/b/a/7" + }, + { + "method": "PATCH", + "raw": "/b/b/a/a" + }, + { + "method": "DELETE", + "raw": "/b/b/a/c" + } + ], + "outcomes": [ + { + "method": "OPTIONS", + "raw": "/b/b/a/x", + "normalized": "/b/b/a/x", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/b/b/a/b/", + "normalized": "/b/b/a/b", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "//b/b/a/ff", + "error": { + "name": "InvalidRequestPathError", + "message": "invalid request path: repeated slash" + } + }, + { + "method": "GET", + "raw": "/b/b/a/a", + "normalized": "/b/b/a/a", + "match": { + "id": "S39.s4", + "params": { + "p3": "a" + } + }, + "resolve": { + "id": "S39.s4", + "params": { + "p3": "a" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/b/b/a/c", + "normalized": "/b/b/a/c", + "match": { + "id": "S39.s1", + "params": {} + }, + "resolve": { + "id": "S39.s1", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/b/b/a/a/x/42", + "normalized": "/b/b/a/a/x/42", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "PATCH", + "raw": "/b/b/a", + "normalized": "/b/b/a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/b/b/a/c", + "normalized": "/b/b/a/c", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/b/b/a/0a", + "normalized": "/b/b/a/0a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "//b/b/a/7", + "error": { + "name": "InvalidRequestPathError", + "message": "invalid request path: repeated slash" + } + }, + { + "method": "PATCH", + "raw": "/b/b/a/a", + "normalized": "/b/b/a/a", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/b/b/a/c", + "normalized": "/b/b/a/c", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + } + ] + }, + { + "id": "S40", + "note": "generated by router-parity-gen-v2, seed 10908, shared prefix /b", + "declarations": [ + { + "id": "S40.s1", + "method": "HEAD", + "pattern": "/b/a/:p2", + "transport": "buffer" + }, + { + "id": "S40.s2", + "method": "PATCH", + "pattern": "/b/:p1/a/:p3", + "transport": "buffer" + }, + { + "id": "S40.s3", + "method": "DELETE", + "pattern": "/b/b/a", + "transport": "buffer" + }, + { + "id": "S40.s4", + "method": "PUT", + "pattern": "/b/a", + "transport": "buffer" + }, + { + "id": "S40.u1", + "method": "GET", + "pattern": "/b/:p1([0-9a-f]{2})/:p2*", + "transport": "buffer" + }, + { + "id": "S40.u2", + "method": "DELETE", + "pattern": "/:p0([a-c]+)/:p1(\\d+)/b", + "transport": "buffer" + }, + { + "id": "S40.u3", + "method": "GET", + "pattern": "/", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "DELETE", + "raw": "/b/%34%32/b" + }, + { + "method": "PUT", + "raw": "/b/a" + }, + { + "method": "GET", + "raw": "/b" + }, + { + "method": "HEAD", + "raw": "/b" + }, + { + "method": "OPTIONS", + "raw": "/b/a" + }, + { + "method": "HEAD", + "raw": "/b/42/%34%32" + }, + { + "method": "GET", + "raw": "/b/a" + }, + { + "method": "POST", + "raw": "/b/b/a/a" + }, + { + "method": "GET", + "raw": "/b/b" + }, + { + "method": "GET", + "raw": "/b" + }, + { + "method": "PUT", + "raw": "/b/a/b" + }, + { + "method": "PUT", + "raw": "/b/caf%C3%A9/" + } + ], + "outcomes": [ + { + "method": "DELETE", + "raw": "/b/%34%32/b", + "normalized": "/b/%34%32/b", + "match": { + "id": "S40.u2", + "params": { + "p0": "b", + "p1": "42" + } + }, + "resolve": { + "id": "S40.u2", + "params": { + "p0": "b", + "p1": "42" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/b/a", + "normalized": "/b/a", + "match": { + "id": "S40.s4", + "params": {} + }, + "resolve": { + "id": "S40.s4", + "params": {}, + "implicitHead": false + }, + "allow": [ + "PUT", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/b", + "normalized": "/b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "HEAD", + "raw": "/b", + "normalized": "/b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "OPTIONS", + "raw": "/b/a", + "normalized": "/b/a", + "match": null, + "resolve": null, + "allow": [ + "PUT", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/b/42/%34%32", + "normalized": "/b/42/%34%32", + "match": null, + "resolve": { + "id": "S40.u1", + "params": { + "p1": "42", + "p2": "42" + }, + "implicitHead": true + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/b/a", + "normalized": "/b/a", + "match": null, + "resolve": null, + "allow": [ + "PUT", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/b/b/a/a", + "normalized": "/b/b/a/a", + "match": null, + "resolve": null, + "allow": [ + "PATCH", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/b/b", + "normalized": "/b/b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "GET", + "raw": "/b", + "normalized": "/b", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "PUT", + "raw": "/b/a/b", + "normalized": "/b/a/b", + "match": null, + "resolve": null, + "allow": [ + "HEAD", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/b/caf%C3%A9/", + "normalized": "/b/caf%C3%A9", + "match": null, + "resolve": null, + "allow": [] + } + ] + } + ] + } +} diff --git a/test/router-parity/frozen/matcher-owner.json b/test/router-parity/frozen/matcher-owner.json new file mode 100644 index 0000000..997806c --- /dev/null +++ b/test/router-parity/frozen/matcher-owner.json @@ -0,0 +1,1190 @@ +{ + "revision": "ed47836c9820c47bf4ed5e902d91e019abdb110a", + "data": [ + { + "id": "O01-backtrack", + "note": "a static branch that fails one level down must fall back to a sibling param branch", + "declarations": [ + { + "id": "static", + "method": "GET", + "pattern": "/a/b/c", + "transport": "buffer" + }, + { + "id": "param", + "method": "GET", + "pattern": "/a/:x/d", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/a/b/d" + }, + { + "method": "GET", + "raw": "/a/b/c" + }, + { + "method": "GET", + "raw": "/a/z/d" + }, + { + "method": "GET", + "raw": "/a/b/x" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/a/b/d", + "normalized": "/a/b/d", + "match": { + "id": "param", + "params": { + "x": "b" + } + }, + "resolve": { + "id": "param", + "params": { + "x": "b" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/a/b/c", + "normalized": "/a/b/c", + "match": { + "id": "static", + "params": {} + }, + "resolve": { + "id": "static", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/a/z/d", + "normalized": "/a/z/d", + "match": { + "id": "param", + "params": { + "x": "z" + } + }, + "resolve": { + "id": "param", + "params": { + "x": "z" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/a/b/x", + "normalized": "/a/b/x", + "match": null, + "resolve": null, + "allow": [] + } + ] + }, + { + "id": "O02-backtrack-deep", + "note": "the static branch fails at depth 5 (and a param branch at depth 3), after walking four or two levels", + "declarations": [ + { + "id": "static", + "method": "GET", + "pattern": "/p/q/r/s/t", + "transport": "buffer" + }, + { + "id": "paramDepth2", + "method": "GET", + "pattern": "/p/:x/r/s/u", + "transport": "buffer" + }, + { + "id": "paramDepth3", + "method": "GET", + "pattern": "/p/q/:y/s/v", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/p/q/r/s/u" + }, + { + "method": "GET", + "raw": "/p/q/r/s/t" + }, + { + "method": "GET", + "raw": "/p/z/r/s/u" + }, + { + "method": "GET", + "raw": "/p/q/r/s/v" + }, + { + "method": "GET", + "raw": "/p/q/z/s/v" + }, + { + "method": "GET", + "raw": "/p/q/r/s/w" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/p/q/r/s/u", + "normalized": "/p/q/r/s/u", + "match": { + "id": "paramDepth2", + "params": { + "x": "q" + } + }, + "resolve": { + "id": "paramDepth2", + "params": { + "x": "q" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/p/q/r/s/t", + "normalized": "/p/q/r/s/t", + "match": { + "id": "static", + "params": {} + }, + "resolve": { + "id": "static", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/p/z/r/s/u", + "normalized": "/p/z/r/s/u", + "match": { + "id": "paramDepth2", + "params": { + "x": "z" + } + }, + "resolve": { + "id": "paramDepth2", + "params": { + "x": "z" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/p/q/r/s/v", + "normalized": "/p/q/r/s/v", + "match": { + "id": "paramDepth3", + "params": { + "y": "r" + } + }, + "resolve": { + "id": "paramDepth3", + "params": { + "y": "r" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/p/q/z/s/v", + "normalized": "/p/q/z/s/v", + "match": { + "id": "paramDepth3", + "params": { + "y": "z" + } + }, + "resolve": { + "id": "paramDepth3", + "params": { + "y": "z" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/p/q/r/s/w", + "normalized": "/p/q/r/s/w", + "match": null, + "resolve": null, + "allow": [] + } + ] + }, + { + "id": "O03-backtrack-constrained", + "note": "the fallback branch is a constrained param", + "declarations": [ + { + "id": "static", + "method": "GET", + "pattern": "/k/1/c", + "transport": "buffer" + }, + { + "id": "digits", + "method": "GET", + "pattern": "/k/:n(\\d+)/d", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/k/1/d" + }, + { + "method": "GET", + "raw": "/k/1/c" + }, + { + "method": "GET", + "raw": "/k/2/d" + }, + { + "method": "GET", + "raw": "/k/x/d" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/k/1/d", + "normalized": "/k/1/d", + "match": { + "id": "digits", + "params": { + "n": "1" + } + }, + "resolve": { + "id": "digits", + "params": { + "n": "1" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/k/1/c", + "normalized": "/k/1/c", + "match": { + "id": "static", + "params": {} + }, + "resolve": { + "id": "static", + "params": {}, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/k/2/d", + "normalized": "/k/2/d", + "match": { + "id": "digits", + "params": { + "n": "2" + } + }, + "resolve": { + "id": "digits", + "params": { + "n": "2" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/k/x/d", + "normalized": "/k/x/d", + "match": null, + "resolve": null, + "allow": [] + } + ] + }, + { + "id": "O04-cross-pattern-allow", + "note": "Allow is the union of methods across different patterns matching the same path", + "declarations": [ + { + "id": "getParam", + "method": "GET", + "pattern": "/a/:id", + "transport": "buffer" + }, + { + "id": "postStatic", + "method": "POST", + "pattern": "/a/b", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "PUT", + "raw": "/a/b" + }, + { + "method": "OPTIONS", + "raw": "/a/b" + }, + { + "method": "PUT", + "raw": "/a/x" + }, + { + "method": "HEAD", + "raw": "/a/b" + }, + { + "method": "GET", + "raw": "/a/b" + }, + { + "method": "POST", + "raw": "/a/x" + } + ], + "outcomes": [ + { + "method": "PUT", + "raw": "/a/b", + "normalized": "/a/b", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/a/b", + "normalized": "/a/b", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/a/x", + "normalized": "/a/x", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/a/b", + "normalized": "/a/b", + "match": null, + "resolve": { + "id": "getParam", + "params": { + "id": "b" + }, + "implicitHead": true + }, + "allow": [ + "GET", + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/a/b", + "normalized": "/a/b", + "match": { + "id": "getParam", + "params": { + "id": "b" + } + }, + "resolve": { + "id": "getParam", + "params": { + "id": "b" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "POST", + "OPTIONS" + ] + }, + { + "method": "POST", + "raw": "/a/x", + "normalized": "/a/x", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + } + ] + }, + { + "id": "O05-cross-pattern-allow-catch-all", + "note": "the same, with a catch-all contributing a method", + "declarations": [ + { + "id": "getParam", + "method": "GET", + "pattern": "/a/:id", + "transport": "buffer" + }, + { + "id": "postStatic", + "method": "POST", + "pattern": "/a/b", + "transport": "buffer" + }, + { + "id": "deleteRest", + "method": "DELETE", + "pattern": "/a/:rest*", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "PUT", + "raw": "/a/b" + }, + { + "method": "OPTIONS", + "raw": "/a/b" + }, + { + "method": "PUT", + "raw": "/a/x" + }, + { + "method": "HEAD", + "raw": "/a/b" + }, + { + "method": "PUT", + "raw": "/a/x/y" + }, + { + "method": "DELETE", + "raw": "/a" + } + ], + "outcomes": [ + { + "method": "PUT", + "raw": "/a/b", + "normalized": "/a/b", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "POST", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/a/b", + "normalized": "/a/b", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "POST", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/a/x", + "normalized": "/a/x", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "HEAD", + "raw": "/a/b", + "normalized": "/a/b", + "match": null, + "resolve": { + "id": "getParam", + "params": { + "id": "b" + }, + "implicitHead": true + }, + "allow": [ + "GET", + "HEAD", + "POST", + "DELETE", + "OPTIONS" + ] + }, + { + "method": "PUT", + "raw": "/a/x/y", + "normalized": "/a/x/y", + "match": null, + "resolve": null, + "allow": [ + "DELETE", + "OPTIONS" + ] + }, + { + "method": "DELETE", + "raw": "/a", + "normalized": "/a", + "match": { + "id": "deleteRest", + "params": { + "rest": "" + } + }, + "resolve": { + "id": "deleteRest", + "params": { + "rest": "" + }, + "implicitHead": false + }, + "allow": [ + "DELETE", + "OPTIONS" + ] + } + ] + }, + { + "id": "O06-encoded-slash-plain", + "note": "an encoded slash inside one segment, plain param", + "declarations": [ + { + "id": "userId", + "method": "GET", + "pattern": "/users/:id", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/users/a%2Fb" + }, + { + "method": "GET", + "raw": "/users/a%2fb" + }, + { + "method": "GET", + "raw": "/users/%2F" + }, + { + "method": "GET", + "raw": "/users/a/b" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/users/a%2Fb", + "normalized": "/users/a%2Fb", + "match": { + "id": "userId", + "params": { + "id": "a/b" + } + }, + "resolve": { + "id": "userId", + "params": { + "id": "a/b" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/users/a%2fb", + "normalized": "/users/a%2fb", + "match": { + "id": "userId", + "params": { + "id": "a/b" + } + }, + "resolve": { + "id": "userId", + "params": { + "id": "a/b" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/users/%2F", + "normalized": "/users/%2F", + "match": { + "id": "userId", + "params": { + "id": "/" + } + }, + "resolve": { + "id": "userId", + "params": { + "id": "/" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/users/a/b", + "normalized": "/users/a/b", + "match": null, + "resolve": null, + "allow": [] + } + ] + }, + { + "id": "O07-encoded-slash-constrained", + "note": "an encoded slash against a word constraint and a non-space constraint (a / cannot appear inside a constraint: the pattern splits there)", + "declarations": [ + { + "id": "word", + "method": "GET", + "pattern": "/c/:id(\\w+)", + "transport": "buffer" + }, + { + "id": "nonSpace", + "method": "GET", + "pattern": "/d/:id(\\S+)", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/c/a%2Fb" + }, + { + "method": "GET", + "raw": "/c/ab" + }, + { + "method": "GET", + "raw": "/d/a%2Fb" + }, + { + "method": "GET", + "raw": "/d/a%2fb" + }, + { + "method": "GET", + "raw": "/d/%2F" + }, + { + "method": "GET", + "raw": "/d/a/b" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/c/a%2Fb", + "normalized": "/c/a%2Fb", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "GET", + "raw": "/c/ab", + "normalized": "/c/ab", + "match": { + "id": "word", + "params": { + "id": "ab" + } + }, + "resolve": { + "id": "word", + "params": { + "id": "ab" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/d/a%2Fb", + "normalized": "/d/a%2Fb", + "match": { + "id": "nonSpace", + "params": { + "id": "a/b" + } + }, + "resolve": { + "id": "nonSpace", + "params": { + "id": "a/b" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/d/a%2fb", + "normalized": "/d/a%2fb", + "match": { + "id": "nonSpace", + "params": { + "id": "a/b" + } + }, + "resolve": { + "id": "nonSpace", + "params": { + "id": "a/b" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/d/%2F", + "normalized": "/d/%2F", + "match": { + "id": "nonSpace", + "params": { + "id": "/" + } + }, + "resolve": { + "id": "nonSpace", + "params": { + "id": "/" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/d/a/b", + "normalized": "/d/a/b", + "match": null, + "resolve": null, + "allow": [] + } + ] + }, + { + "id": "O08-zero-segment-catch-all", + "note": "a catch-all with no exact sibling route", + "declarations": [ + { + "id": "rest", + "method": "GET", + "pattern": "/files/:rest*", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/files" + }, + { + "method": "GET", + "raw": "/files/" + }, + { + "method": "GET", + "raw": "/files/a" + }, + { + "method": "GET", + "raw": "/filesx" + }, + { + "method": "HEAD", + "raw": "/files" + }, + { + "method": "OPTIONS", + "raw": "/files" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/files", + "normalized": "/files", + "match": { + "id": "rest", + "params": { + "rest": "" + } + }, + "resolve": { + "id": "rest", + "params": { + "rest": "" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/files/", + "normalized": "/files", + "match": { + "id": "rest", + "params": { + "rest": "" + } + }, + "resolve": { + "id": "rest", + "params": { + "rest": "" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/files/a", + "normalized": "/files/a", + "match": { + "id": "rest", + "params": { + "rest": "a" + } + }, + "resolve": { + "id": "rest", + "params": { + "rest": "a" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/filesx", + "normalized": "/filesx", + "match": null, + "resolve": null, + "allow": [] + }, + { + "method": "HEAD", + "raw": "/files", + "normalized": "/files", + "match": null, + "resolve": { + "id": "rest", + "params": { + "rest": "" + }, + "implicitHead": true + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "OPTIONS", + "raw": "/files", + "normalized": "/files", + "match": null, + "resolve": null, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + } + ] + }, + { + "id": "O09-root-catch-all", + "note": "a root catch-all alone", + "declarations": [ + { + "id": "rest", + "method": "GET", + "pattern": "/:rest*", + "transport": "buffer" + } + ], + "requests": [ + { + "method": "GET", + "raw": "/" + }, + { + "method": "GET", + "raw": "/a" + }, + { + "method": "GET", + "raw": "/a/b/" + } + ], + "outcomes": [ + { + "method": "GET", + "raw": "/", + "normalized": "/", + "match": { + "id": "rest", + "params": { + "rest": "" + } + }, + "resolve": { + "id": "rest", + "params": { + "rest": "" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/a", + "normalized": "/a", + "match": { + "id": "rest", + "params": { + "rest": "a" + } + }, + "resolve": { + "id": "rest", + "params": { + "rest": "a" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + }, + { + "method": "GET", + "raw": "/a/b/", + "normalized": "/a/b", + "match": { + "id": "rest", + "params": { + "rest": "a/b" + } + }, + "resolve": { + "id": "rest", + "params": { + "rest": "a/b" + }, + "implicitHead": false + }, + "allow": [ + "GET", + "HEAD", + "OPTIONS" + ] + } + ] + } + ] +} diff --git a/test/router-parity/frozen/owner-app-allow.json b/test/router-parity/frozen/owner-app-allow.json new file mode 100644 index 0000000..2b5319d --- /dev/null +++ b/test/router-parity/frozen/owner-app-allow.json @@ -0,0 +1,165 @@ +{ + "revision": "ed47836c9820c47bf4ed5e902d91e019abdb110a", + "data": [ + { + "adapter": "fetch", + "method": "PUT", + "path": "/ca/b", + "status": 405, + "allow": "GET, HEAD, POST, OPTIONS", + "body": "{\"error\":\"Method Not Allowed\"}" + }, + { + "adapter": "fetch", + "method": "OPTIONS", + "path": "/ca/b", + "status": 204, + "allow": "GET, HEAD, POST, OPTIONS", + "body": "" + }, + { + "adapter": "fetch", + "method": "PUT", + "path": "/ca/x", + "status": 405, + "allow": "GET, HEAD, OPTIONS", + "body": "{\"error\":\"Method Not Allowed\"}" + }, + { + "adapter": "fetch", + "method": "HEAD", + "path": "/ca/b", + "status": 200, + "allow": null, + "body": "" + }, + { + "adapter": "fetch", + "method": "PUT", + "path": "/ca/x/y", + "status": 404, + "allow": null, + "body": "{\"error\":\"Not Found\"}" + }, + { + "adapter": "fetch", + "method": "PUT", + "path": "/cb/b", + "status": 405, + "allow": "GET, HEAD, POST, DELETE, OPTIONS", + "body": "{\"error\":\"Method Not Allowed\"}" + }, + { + "adapter": "fetch", + "method": "OPTIONS", + "path": "/cb/b", + "status": 204, + "allow": "GET, HEAD, POST, DELETE, OPTIONS", + "body": "" + }, + { + "adapter": "fetch", + "method": "PUT", + "path": "/cb/x", + "status": 405, + "allow": "GET, HEAD, DELETE, OPTIONS", + "body": "{\"error\":\"Method Not Allowed\"}" + }, + { + "adapter": "fetch", + "method": "HEAD", + "path": "/cb/b", + "status": 200, + "allow": null, + "body": "" + }, + { + "adapter": "fetch", + "method": "PUT", + "path": "/cb/x/y", + "status": 405, + "allow": "DELETE, OPTIONS", + "body": "{\"error\":\"Method Not Allowed\"}" + }, + { + "adapter": "node", + "method": "PUT", + "path": "/ca/b", + "status": 405, + "allow": "GET, HEAD, POST, OPTIONS", + "body": "{\"error\":\"Method Not Allowed\"}" + }, + { + "adapter": "node", + "method": "OPTIONS", + "path": "/ca/b", + "status": 204, + "allow": "GET, HEAD, POST, OPTIONS", + "body": "" + }, + { + "adapter": "node", + "method": "PUT", + "path": "/ca/x", + "status": 405, + "allow": "GET, HEAD, OPTIONS", + "body": "{\"error\":\"Method Not Allowed\"}" + }, + { + "adapter": "node", + "method": "HEAD", + "path": "/ca/b", + "status": 200, + "allow": null, + "body": "" + }, + { + "adapter": "node", + "method": "PUT", + "path": "/ca/x/y", + "status": 404, + "allow": null, + "body": "{\"error\":\"Not Found\"}" + }, + { + "adapter": "node", + "method": "PUT", + "path": "/cb/b", + "status": 405, + "allow": "GET, HEAD, POST, DELETE, OPTIONS", + "body": "{\"error\":\"Method Not Allowed\"}" + }, + { + "adapter": "node", + "method": "OPTIONS", + "path": "/cb/b", + "status": 204, + "allow": "GET, HEAD, POST, DELETE, OPTIONS", + "body": "" + }, + { + "adapter": "node", + "method": "PUT", + "path": "/cb/x", + "status": 405, + "allow": "GET, HEAD, DELETE, OPTIONS", + "body": "{\"error\":\"Method Not Allowed\"}" + }, + { + "adapter": "node", + "method": "HEAD", + "path": "/cb/b", + "status": 200, + "allow": null, + "body": "" + }, + { + "adapter": "node", + "method": "PUT", + "path": "/cb/x/y", + "status": 405, + "allow": "DELETE, OPTIONS", + "body": "{\"error\":\"Method Not Allowed\"}" + } + ] +} diff --git a/test/router-parity/frozen/owner-mesh-lifetime.json b/test/router-parity/frozen/owner-mesh-lifetime.json new file mode 100644 index 0000000..5eecf90 --- /dev/null +++ b/test/router-parity/frozen/owner-mesh-lifetime.json @@ -0,0 +1,133 @@ +{ + "revision": "ed47836c9820c47bf4ed5e902d91e019abdb110a", + "data": [ + { + "phase": "A1 teapot up at boot", + "method": "GET", + "path": "/api/remote/ping", + "status": 200, + "allow": null, + "body": "{\"from\":\"teapot\"}" + }, + { + "phase": "A1 teapot up at boot", + "method": "POST", + "path": "/api/remote/ping", + "status": 405, + "allow": "GET, HEAD, OPTIONS", + "body": "{\"error\":\"Method Not Allowed\"}" + }, + { + "phase": "A1 teapot up at boot", + "method": "GET", + "path": "/api/local/ok", + "status": 200, + "allow": null, + "body": "{\"from\":\"teacup\"}" + }, + { + "phase": "A1 teapot up at boot", + "method": "GET", + "path": "/api/nope", + "status": 404, + "allow": null, + "body": "{\"error\":\"Not Found\"}" + }, + { + "phase": "A2 teapot gone after boot", + "method": "GET", + "path": "/api/remote/ping", + "status": 503, + "allow": null, + "body": "{\"error\":\"mesh link to /__mesh__/control is down\"}" + }, + { + "phase": "A2 teapot gone after boot", + "method": "POST", + "path": "/api/remote/ping", + "status": 405, + "allow": "GET, HEAD, OPTIONS", + "body": "{\"error\":\"Method Not Allowed\"}" + }, + { + "phase": "A2 teapot gone after boot", + "method": "GET", + "path": "/api/local/ok", + "status": 200, + "allow": null, + "body": "{\"from\":\"teacup\"}" + }, + { + "phase": "A2 teapot gone after boot", + "method": "GET", + "path": "/api/nope", + "status": 404, + "allow": null, + "body": "{\"error\":\"Not Found\"}" + }, + { + "phase": "B1 teapot absent at boot", + "method": "GET", + "path": "/api/remote/ping", + "status": 404, + "allow": null, + "body": "{\"error\":\"Not Found\"}" + }, + { + "phase": "B1 teapot absent at boot", + "method": "POST", + "path": "/api/remote/ping", + "status": 404, + "allow": null, + "body": "{\"error\":\"Not Found\"}" + }, + { + "phase": "B1 teapot absent at boot", + "method": "GET", + "path": "/api/local/ok", + "status": 200, + "allow": null, + "body": "{\"from\":\"teacup\"}" + }, + { + "phase": "B1 teapot absent at boot", + "method": "GET", + "path": "/api/nope", + "status": 404, + "allow": null, + "body": "{\"error\":\"Not Found\"}" + }, + { + "phase": "B2 teapot up after boot", + "method": "GET", + "path": "/api/remote/ping", + "status": 404, + "allow": null, + "body": "{\"error\":\"Not Found\"}" + }, + { + "phase": "B2 teapot up after boot", + "method": "POST", + "path": "/api/remote/ping", + "status": 404, + "allow": null, + "body": "{\"error\":\"Not Found\"}" + }, + { + "phase": "B2 teapot up after boot", + "method": "GET", + "path": "/api/local/ok", + "status": 200, + "allow": null, + "body": "{\"from\":\"teacup\"}" + }, + { + "phase": "B2 teapot up after boot", + "method": "GET", + "path": "/api/nope", + "status": 404, + "allow": null, + "body": "{\"error\":\"Not Found\"}" + } + ] +} diff --git a/test/router-parity/generator.ts b/test/router-parity/generator.ts index efa3a02..bb67e91 100644 --- a/test/router-parity/generator.ts +++ b/test/router-parity/generator.ts @@ -119,3 +119,93 @@ export function generateScenarios(seed: number = GENERATOR_SEED): Scenario[] { return { id, note: `generated by ${GENERATOR_VERSION}, seed ${seed}`, declarations, requests }; }); } + +/** + * Version 2: the same seed and helpers, plus rules that force shared prefixes, so a meaningful share + * of cases puts static, param, constrained and catch-all siblings under one prefix and makes the + * lookup leave a branch it has already walked into. Frozen in `frozen/matcher-generated-v2.json`; + * v1 above and its frozen file are unchanged. + */ +export const GENERATOR_V2_VERSION = 'router-parity-gen-v2'; + +export const GENERATOR_V2_RULES = [ + 'PRNG: mulberry32(seed), fresh for v2; every choice below draws from it in program order.', + '40 scenarios; each has a shared static prefix of 0-3 segments (a|b|c|x), so siblings sit at depth 1-4.', + 'Each scenario has 3-6 sibling declarations: prefix + one sibling segment + a tail. The first sibling segment is ' + + 'static, the second a plain or constrained param; the rest are static (p=0.35), plain (p=0.25), constrained ' + + '(p=0.25) or a final catch-all (p=0.15). Tails are 0-2 segments, static/plain/constrained, none after a catch-all.', + 'Then 0-3 unrelated declarations made by the v1 declaration rule.', + 'Methods and transports follow the v1 declaration rule.', + 'Requests (12): p=0.5 instantiate a sibling; p=0.25 cross two siblings (prefix and sibling segment of one, tail ' + + 'of another) to force a partial match; else prefix + 0-3 pool values. v1 decoration and request methods apply.', + 'Unsupported patterns are never produced: every generated pattern must pass compilePattern.', +]; + +function siblingSegment(rng: Rng, depth: number, index: number): string { + if (index === 0) return pick(rng, STATICS); + if (index === 1) return rng() < 0.5 ? `:p${depth}` : `:p${depth}(${pick(rng, CONSTRAINTS)})`; + const roll = rng(); + if (roll < 0.35) return pick(rng, STATICS); + if (roll < 0.6) return `:p${depth}`; + if (roll < 0.85) return `:p${depth}(${pick(rng, CONSTRAINTS)})`; + return `:p${depth}*`; +} + +function siblingDeclaration(rng: Rng, id: string, prefix: string[], index: number): Declaration { + const sibling = siblingSegment(rng, prefix.length, index); + const segments = [...prefix, sibling]; + if (!sibling.endsWith('*')) { + const tail = int(rng, 0, 2); + for (let t = 0; t < tail; t++) { + const depth = segments.length; + const roll = rng(); + segments.push( + roll < 0.5 ? pick(rng, STATICS) : roll < 0.75 ? `:p${depth}` : `:p${depth}(${pick(rng, CONSTRAINTS)})`, + ); + } + } + + const method = pick(rng, DECL_METHODS); + const transport: Transport = method === 'GET' && rng() >= 0.7 ? pick(rng, STREAMING) : 'buffer'; + const pattern = `/${segments.join('/')}`; + compilePattern(pattern); + return { id, method, pattern, transport }; +} + +function siblingRequest(rng: Rng, prefixLength: number, siblings: Declaration[]): Request { + const roll = rng(); + let segments: string[]; + + if (roll < 0.5) { + segments = instantiate(rng, pick(rng, siblings)); + } else if (roll < 0.75) { + const head = instantiate(rng, pick(rng, siblings)).slice(0, prefixLength + 1); + const tail = instantiate(rng, pick(rng, siblings)).slice(prefixLength + 1); + segments = [...head, ...tail]; + } else { + const prefix = instantiate(rng, siblings[0]).slice(0, prefixLength); + segments = [...prefix, ...Array.from({ length: int(rng, 0, 3) }, () => pick(rng, VALUES))]; + } + + return { method: pick(rng, REQUEST_METHODS), raw: decorate(rng, segments) }; +} + +export function generateScenariosV2(seed: number = GENERATOR_SEED): Scenario[] { + const rng = mulberry32(seed); + + return Array.from({ length: 40 }, (_, index): Scenario => { + const id = `S${String(index + 1).padStart(2, '0')}`; + const prefix = Array.from({ length: int(rng, 0, 3) }, () => pick(rng, STATICS)); + const siblings = Array.from({ length: int(rng, 3, 6) }, (_, s) => + siblingDeclaration(rng, `${id}.s${s + 1}`, prefix, s), + ); + const unrelated = Array.from({ length: int(rng, 0, 3) }, (_, u) => declaration(rng, `${id}.u${u + 1}`)); + const requests = Array.from({ length: 12 }, () => siblingRequest(rng, prefix.length, siblings)); + return { + id, + note: `generated by ${GENERATOR_V2_VERSION}, seed ${seed}, shared prefix /${prefix.join('/')}`, + declarations: [...siblings, ...unrelated], + requests, + }; + }); +} diff --git a/test/router-parity/matcher.test.ts b/test/router-parity/matcher.test.ts index 67a0772..18d0df6 100644 --- a/test/router-parity/matcher.test.ts +++ b/test/router-parity/matcher.test.ts @@ -13,8 +13,17 @@ import { matchWsRoute as liveMatchWsRoute } from '../../src/http/ws-core'; import type { WsRouteDef } from '../../src/http/types'; import * as oracle from './oracle'; import { runScenario, type MatcherImpl, type Outcome, type Scenario } from './matcher'; -import { HAND_SCENARIOS } from './cases'; -import { generateScenarios, GENERATOR_RULES, GENERATOR_SEED, GENERATOR_VERSION } from './generator'; +import { HAND_SCENARIOS, OWNER_SCENARIOS } from './cases'; +import { branchStats, type BranchStats } from './branches'; +import { + generateScenarios, + generateScenariosV2, + GENERATOR_RULES, + GENERATOR_SEED, + GENERATOR_VERSION, + GENERATOR_V2_RULES, + GENERATOR_V2_VERSION, +} from './generator'; import { frozen, expectFrozenEqual } from './frozen'; const LIVE: MatcherImpl = live; @@ -81,6 +90,53 @@ describe(`router parity: generated matcher cases (${GENERATOR_VERSION}, seed ${G } }); +describe('router parity: owner-requested matcher cases', () => { + let expected: Map; + + beforeAll(async () => { + const data = await frozen('matcher-owner', () => capture(OWNER_SCENARIOS)); + expect(data.map((scenario) => scenario.id)).toEqual(OWNER_SCENARIOS.map((scenario) => scenario.id)); + expected = new Map(data.map((scenario) => [scenario.id, scenario])); + }); + + for (const scenario of OWNER_SCENARIOS) { + it(`${scenario.id}: ${scenario.note}`, () => checkScenario(scenario, expected.get(scenario.id))); + } +}); + +interface GeneratedV2File extends GeneratedFile { + /** Share of generated requests that walk into sibling branches; v1's share is kept for contrast. */ + branchStats: { v1: BranchStats; v2: BranchStats }; +} + +describe(`router parity: generated shared-prefix cases (${GENERATOR_V2_VERSION}, seed ${GENERATOR_SEED})`, () => { + const generated = generateScenariosV2(GENERATOR_SEED); + const stats = () => ({ v1: branchStats(generateScenarios(GENERATOR_SEED)), v2: branchStats(generated) }); + let expected: Map; + + beforeAll(async () => { + const data = await frozen('matcher-generated-v2', () => ({ + generator: GENERATOR_V2_VERSION, + seed: GENERATOR_SEED, + rules: GENERATOR_V2_RULES, + branchStats: stats(), + scenarios: capture(generated), + })); + expect({ generator: data.generator, seed: data.seed, rules: data.rules }).toEqual({ + generator: GENERATOR_V2_VERSION, + seed: GENERATOR_SEED, + rules: GENERATOR_V2_RULES, + }); + expect(stats()).toEqual(data.branchStats); + expect(data.scenarios.map((scenario) => scenario.id)).toEqual(generated.map((scenario) => scenario.id)); + expected = new Map(data.scenarios.map((scenario) => [scenario.id, scenario])); + }); + + for (const scenario of generated) { + it(`${scenario.id}`, () => checkScenario(scenario, expected.get(scenario.id))); + } +}); + describe('router parity: WebSocket matcher (first registered wins)', () => { // WS selection is a separate contract from HTTP: no specificity ranking, registration order only. // Paths are fed already normalized, as both upgrade adapters do since #117. diff --git a/test/router-parity/owner.test.ts b/test/router-parity/owner.test.ts new file mode 100644 index 0000000..57e8be7 --- /dev/null +++ b/test/router-parity/owner.test.ts @@ -0,0 +1,204 @@ +/** + * Owner-requested additions (CARD-08 review) that need a running app: cross-pattern `Allow` through + * both adapters, and the HTTP route table across a mesh peer's lifetime. + */ +import 'reflect-metadata'; +import http from 'http'; +import net from 'net'; +import type { AddressInfo } from 'net'; +import { describe, it, afterAll, beforeAll } from 'vitest'; +import { createApp, Route, Get, Post, Delete, Module, param } from '../../src/index'; +import type { App } from '../../src/app/types'; +import type { Logger } from '../../src/logger'; +import { frozen, expectFrozenEqual } from './frozen'; + +// `/ca` is GET :id + POST b; `/cb` adds DELETE :rest*. Two prefixes because one app cannot hold both +// variants at the same path. +@Route('/') +class CrossAllow { + @Get('/ca/:id') caGet(@param() p: Record) { + return { id: 'caGet', p }; + } + @Post('/ca/b') caPost() { + return { id: 'caPost' }; + } + @Get('/cb/:id') cbGet(@param() p: Record) { + return { id: 'cbGet', p }; + } + @Post('/cb/b') cbPost() { + return { id: 'cbPost' }; + } + @Delete('/cb/:rest*') cbDelete(@param() p: Record) { + return { id: 'cbDelete', p }; + } +} +@Module({ mountpoint: '/', controllers: [CrossAllow] }) +class CrossAllowModule {} + +const ALLOW_REQUESTS: Array<[string, string]> = ['/ca', '/cb'].flatMap((base): Array<[string, string]> => [ + ['PUT', `${base}/b`], + ['OPTIONS', `${base}/b`], + ['PUT', `${base}/x`], + ['HEAD', `${base}/b`], + ['PUT', `${base}/x/y`], +]); + +interface Seen { + method: string; + path: string; + status: number; + allow: string | null; + body: string; +} + +function nodeRequest(port: number, method: string, path: string): Promise { + return new Promise((resolve, reject) => { + const req = http.request({ host: '127.0.0.1', port, method, path, agent: false }, (res) => { + let body = ''; + res.setEncoding('utf8'); + res.on('data', (chunk) => (body += chunk)); + res.on('end', () => + resolve({ method, path, status: res.statusCode ?? 0, allow: (res.headers.allow as string) ?? null, body }), + ); + }); + req.on('error', reject); + req.end(); + }); +} + +async function fetchRequest(app: App, method: string, path: string): Promise { + const res = await app.fetch(new Request(`http://parity.test${path}`, { method })); + return { method, path, status: res.status, allow: res.headers.get('allow'), body: await res.text() }; +} + +// ── mesh: the HTTP route table across a peer's lifetime ───────────────────────────────────────── + +const SECRET = 'parity-secret'; + +@Route('/remote') +class RemoteCtl { + @Get('/ping', { export: true }) ping() { + return { from: 'teapot' }; + } +} +@Module({ mountpoint: '/api', controllers: [RemoteCtl] }) +class TeapotModule {} + +@Route('/local') +class LocalCtl { + @Get('/ok') ok() { + return { from: 'teacup' }; + } +} +@Module({ mountpoint: '/api', controllers: [LocalCtl] }) +class TeacupModule {} + +const quiet: Logger = { debug: () => {}, info: () => {}, warn: () => {}, error: () => {} }; + +/** A port nothing is listening on, that a teapot can take later. */ +async function freePort(): Promise { + const server = net.createServer(); + await new Promise((resolve) => server.listen(0, '127.0.0.1', resolve)); + const { port } = server.address() as AddressInfo; + await new Promise((resolve) => server.close(() => resolve())); + return port; +} + +// Same probes at every phase: the remote hit, its method miss, a local hit and a path miss. +const PROBES: Array<[string, string]> = [ + ['GET', '/api/remote/ping'], + ['POST', '/api/remote/ping'], + ['GET', '/api/local/ok'], + ['GET', '/api/nope'], +]; + +async function probe(app: App, phase: string) { + const out = []; + for (const [method, path] of PROBES) { + const { status, allow, body } = await fetchRequest(app, method, path); + // The teapot's ephemeral port appears in the 503 body; the port is not routing behaviour. + out.push({ phase, method, path, status, allow, body: body.replace(/ws:\/\/127\.0\.0\.1:\d+/g, '') }); + } + return out; +} + +const teacupFor = (port: number) => + createApp({ + modules: [TeacupModule], + experimental: true, + logger: quiet, + mesh: { + teapots: [{ url: `ws://127.0.0.1:${port}/__mesh__/control`, secret: SECRET }], + bootTimeoutMs: 300, + timeoutMs: 500, + reconnect: false, + }, + }); + +/** + * Two lifetimes. A: the teapot is up at boot, then goes away. B: the teapot is absent at boot and + * comes up afterwards. The current code builds the HTTP table once, at boot, and never changes it: + * routes spliced at boot stay in the table after their peer leaves, and a peer that arrives late + * is never spliced in. CARD-10 can reuse this to assert the index is not rebuilt per request. + */ +async function meshLifetimes() { + const results = []; + + const portA = await freePort(); + const teapotA = createApp({ modules: [TeapotModule], experimental: true, mesh: { secret: SECRET } }); + await teapotA.listen(portA); + const teacupA = teacupFor(portA); + try { + results.push(...(await probe(teacupA, 'A1 teapot up at boot'))); + await teapotA.close(); + results.push(...(await probe(teacupA, 'A2 teapot gone after boot'))); + } finally { + await teacupA.close(); + } + + const portB = await freePort(); + const teacupB = teacupFor(portB); + const teapotB = createApp({ modules: [TeapotModule], experimental: true, mesh: { secret: SECRET } }); + try { + results.push(...(await probe(teacupB, 'B1 teapot absent at boot'))); + await teapotB.listen(portB); + results.push(...(await probe(teacupB, 'B2 teapot up after boot'))); + } finally { + await teacupB.close(); + await teapotB.close(); + } + + return results; +} + +describe('router parity: owner-requested application cases', () => { + let fetchApp: App; + let nodeApp: App; + let port: number; + + beforeAll(async () => { + fetchApp = createApp({ modules: [CrossAllowModule] }); + nodeApp = createApp({ modules: [CrossAllowModule] }); + port = ((await nodeApp.listen(0)).address() as AddressInfo).port; + }); + + afterAll(() => nodeApp.close()); + + it('cross-pattern Allow through app.fetch and Node equals the frozen capture', async () => { + const run = async () => { + const out: Array = []; + for (const [method, path] of ALLOW_REQUESTS) + out.push({ adapter: 'fetch', ...(await fetchRequest(fetchApp, method, path)) }); + for (const [method, path] of ALLOW_REQUESTS) + out.push({ adapter: 'node', ...(await nodeRequest(port, method, path)) }); + return out; + }; + const expected = await frozen('owner-app-allow', run); + expectFrozenEqual(await run(), expected, 'cross-pattern Allow'); + }); + + it('the mesh HTTP route table across a peer lifetime equals the frozen capture', async () => { + const expected = await frozen('owner-mesh-lifetime', meshLifetimes); + expectFrozenEqual(await meshLifetimes(), expected, 'mesh lifetime'); + }, 30_000); +});