Skip to content

fix(api): let a HEAD served by a declining GET fall through like GET - #31

Merged
ryansolid merged 1 commit into
mainfrom
claude/project-thread-8nkr3a
Oct 22, 2026
Merged

ryansolid merged 1 commit into
mainfrom
claude/project-thread-8nkr3a

Conversation

@ryansolid

Copy link
Copy Markdown
Member

Requested by Ryan · project thread

Fixes #19

createAPIHandler answers HEAD with the module's GET export, but only a GET request was allowed to decline (return undefined). A HEAD answered by a declining GET threw "did not return a response", which apps turn into a 500. So a page with a conditional GET (canonical redirects and the like) answered 200 to GET and 500 to HEAD.

The decline check now accepts HEAD as well: a page falls through to the chain (the server drops the body), and a handler-only route answers 404, the same as GET. This is the fix @frenzzy suggested in the issue, with their test.


Generated by Claude Code

Fixes #19

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PtVqG6fjQyZv5ZnEFKdcyK
@ryansolid ryansolid self-assigned this Oct 22, 2026
@ryansolid
ryansolid merged commit 0ca9519 into main Oct 22, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

createAPIHandler: HEAD served by a declining GET throws (500) instead of falling through like GET

2 participants