Mesh: HEAD on a remote GET route returns 404 while Allow advertises HEAD #125

Closed
opened 2026-10-10 23:22:27 +00:00 by chrnx · 2 comments
Owner

The core #123 parity corpus captures this in owner-mesh-allow.json.

A teacup with a remote GET /api/x (no local route):

  • OPTIONS /api/x advertises GET, HEAD, OPTIONS;
  • HEAD /api/x returns 404.

The teacup's matcher correctly resolves HEAD as an implicit HEAD on the remote GET. The mesh proxy then forwards the request with method HEAD. The teapot looks up a route for that pattern with method HEAD (src/app/index.ts:1166), finds none, and answers 404.

Expected: HEAD on a remote buffered GET behaves like a local one, returning the GET's status and headers with no body. Either forward the request as GET and drop the body, or have the teapot apply implicit HEAD.

Fixing this changes a frozen capture, so the corpus update needs explicit approval.

The core #123 parity corpus captures this in `owner-mesh-allow.json`. A teacup with a remote `GET /api/x` (no local route): - `OPTIONS /api/x` advertises `GET, HEAD, OPTIONS`; - `HEAD /api/x` returns **404**. The teacup's matcher correctly resolves HEAD as an implicit HEAD on the remote GET. The mesh proxy then forwards the request with method `HEAD`. The teapot looks up a route for that pattern with method HEAD (`src/app/index.ts:1166`), finds none, and answers 404. Expected: HEAD on a remote buffered GET behaves like a local one, returning the GET's status and headers with no body. Either forward the request as GET and drop the body, or have the teapot apply implicit HEAD. Fixing this changes a frozen capture, so the corpus update needs explicit approval.
Author
Owner

Merged into develop in #137 (CARD-20, FPRD-001c, 2026-10-23). Left open until the 1c acceptance gate (CARD-22), per the 1a/1b convention.

Merged into develop in #137 (CARD-20, FPRD-001c, 2026-10-23). Left open until the 1c acceptance gate (CARD-22), per the 1a/1b convention.
Author
Owner

Fixed in 26.11.0-rc.1 (ae9e552, 5783212). From the changelog:

  • Mesh (alpha): HEAD on a remote GET route now works (#125). The teacup resolved HEAD to the remote GET and OPTIONS advertised HEAD, but the request went to the teapot as HEAD, which has no HEAD plan, so it answered 404. The teacup now forwards it as a GET and drops the body, so it answers like a local route: the GET's status and headers, no body, and a 404/500 from the route keeps its status. An explicit remote HEAD route still takes precedence. The teapot is unchanged, so a new teacup works against an older teapot during a rolling deploy.
Fixed in **26.11.0-rc.1** (`ae9e552`, `5783212`). From the changelog: - **Mesh (alpha): `HEAD` on a remote `GET` route now works** (#125). The teacup resolved `HEAD` to the remote `GET` and `OPTIONS` advertised `HEAD`, but the request went to the teapot as `HEAD`, which has no `HEAD` plan, so it answered `404`. The teacup now forwards it as a `GET` and drops the body, so it answers like a local route: the `GET`'s status and headers, no body, and a `404`/`500` from the route keeps its status. An explicit remote `HEAD` route still takes precedence. The teapot is unchanged, so a new teacup works against an older teapot during a rolling deploy.
chrnx closed this issue 2026-11-18 01:04:13 +00:00
Sign in to join this conversation.