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 <diego.resendez@zero-oneit.com>
166 lines
3.6 KiB
JSON
166 lines
3.6 KiB
JSON
{
|
|
"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\"}"
|
|
}
|
|
]
|
|
}
|