Behaviour when incoming request method is HEAD?
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Active
- Tech stack
- typescript
- Domain
- api
Research direction
Start with the +handler.ts endpoint using Run.GET and reproduce the difference between GET and HEAD, focusing on the shape of ctx.search. Determine the intended behavior when only a GET handler exists, then verify that HEAD follows that decision without crashing; the issue is done when the behavior is specified and the reported failure is covered.
Written by the indexing model from the issue text.
Description
I originally wanted to submit this as a bug report:
Given I have a
+handler.tswith onlyexport const GET = Run.GET({ search: ...}, (ctx) => { ... }).
When I hit the endpoint with HTTP GET
Then the handler executes correctly. Importantly,ctx.searchis a tuple and destructuring it works.But,
When I hit the same endpoint with HTTP HEAD
The handler executes, but crash becausectx.searchis not a tuple in this case.
The more I think about it though, I started wondering what the correct behavior should be, when GET handler is defined but HEAD handler is not, and an incoming request method is HEAD?
- return 404 if
GEThandler is defined, butHEADhandler is not? - process the
GEThandler, including rendering the body, but returning only the HEAD content - this is to avoid issues like unhandled exceptions in promises generated by theGEThandler or any outer middleware? This seems wasteful, but is safe.
- Dominant language
- TypeScript
- Stars
- 175
- Forks
- 16
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 6
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from marko-js/run
-
DEP0190: spawnServer passes args array with shell:true, triggering Node v26 deprecation warningOpen
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 38/100
Maintainers usually reply within 1 day
Similar issues
-
needs:triage
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
ai-discovered
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
jessepollak/home#1627 ·
Maintainers usually reply within 1 day
-
agent-canvas bug llm priority:low ready-for-dev
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
OpenHands/OpenHands#17806 · 3 comments ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
radius-project/ai-extensions#923 ·
Maintainers usually reply within 1 day