Repository navigation
Conversation
ServerlessRequest extends http.IncomingMessage and assigns headers, but never assigns rawHeaders, so it stays the empty array from the base class. Anything that reads the standard rawHeaders property sees no headers at all, while req.headers looks perfectly normal. This bites when the request is converted into a WHATWG Request, which is what @hono/node-server does and therefore what anything built on it does. In our case an MCP server behind a Lambda Function URL answered every POST with "415 Unsupported Media Type: Content-Type must be application/json" while the health check kept working, because the conversion read rawHeaders and found nothing. The original casing and ordering of the wire headers is not recoverable here: providers lower-case and merge them before the request is built. As header names are case-insensitive, reconstructing the flat list from the normalised object is a faithful enough IncomingMessage.
ganur2004
added a commit
to ganur2004/safezone
that referenced
this pull request
Oct 22, 2026
The submission went in on 22 October. SUBMISSION.md now says so, with the links a reader would want: the Devpost page, the video, and the public repository, which GitHub now reports as public under MIT. The Open Source mini challenge is no longer blocked: the serverless-http fix is open upstream as dougmoscrop/serverless-http#315, and DEVPOST.md links to it. Only the checklist items that were actually verified are ticked. A clean clone build and the keyless demo were not re-run for this commit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ServerlessRequest extends http.IncomingMessage and assigns
headers, but neverrawHeaders, so it stays the empty array from the base class. Anything that reads the standardrawHeadersproperty sees no headers at all, whilereq.headerslooks normal.This bites when the request is converted into a WHATWG Request, which is what @hono/node-server does. In our case an MCP server behind a Lambda Function URL answered every POST with "415 Unsupported Media Type: Content-Type must be application/json" while the health check kept working, because the conversion read
rawHeadersand found nothing.The fix rebuilds the flat [name, value, ...] list from the normalised headers object. The original casing and order are not recoverable at this point (providers normalise them first), but header names are case-insensitive, so this is a faithful enough IncomingMessage.
Includes a regression test; the full suite passes (117 tests).