test.network proxy and direct node route the same URL path differently (trailing-slash / %2e%2e normalization divergence)
Report
Summary
The two documented-equivalent API surfaces — the versioned proxy (https://test.network/api/v1) and the direct node (https://ldn.core.test.network) — route the same URL path to different results, because the proxy normalizes the URL (trailing slash, %2e%2e dot-segments, .. collapsing) while the node does not.
Where
- Proxy:
https://test.network/api/v1/*(nginx front, normalizes path before forwarding). - Direct:
https://ldn.core.test.network/*(Gohttp.ServeMux, no normalization). - OpenAPI states both expose "the same JSON HTTP API" (
serverslist marks them equivalent).
What I observed
| Request | direct node | proxy |
|---|---|---|
GET /node/ (trailing slash) |
404 page not found |
200 (or 308 redirect) — full node info |
GET /statechain/kv/ (empty wildcard) |
400 {"error":"missing key"} |
200 full governance KV map |
GET /statechain/kv/sys.network_id/ (trailing slash) |
404 {"error":"key not found"} |
200 {key:sys.network_id, value:testnet-0005} |
GET /statechain/kv/%2e%2e/sys.network_id |
404 "key not found" (literal key) |
404 {"code":"not_found","message":"No API route at /api/v1/statechain/sys.network_id"} (nginx decoded %2e%2e → ../ and collapsed it) |
The proxy strips trailing slashes and decodes/collapses dot-segments before forwarding; the node treats both literally ({key...} wildcard, exact path match).
Impact
Integrations that pin one surface cannot rely on equivalent routing between the two — a path that resolves on the proxy 404s (or hits a different handler) on the direct node and vice-versa. It is a consistency/interpretation conflict between the two advertised-equivalent surfaces. No auth or trusted-boundary escape: %2e%2e collapses inside /api/v1 (it does not escape the /api prefix or reach another service; /api/v1/../../node → SPA 404).
Reproduce
curl -s -o /dev/null -w '%{http_code}\n' https://ldn.core.test.network/node/
curl -s -o /dev/null -w '%{http_code}\n' https://test.network/api/v1/node/
Severity
Minor — inconsistent API responses / path-equivalence divergence between the two documented-equivalent surfaces.
Thread
Thanks for the report. We have read it and are checking how the hosted proxy handles these paths against what the node does. We will update this ticket when there is more to share.