Skip to content

Read the method of a visit before the lambda takes the headers - #117

Merged
Kaliumhexacyanoferrat merged 1 commit into
mainfrom
fix/visit-header-after-body
Oct 13, 2026
Merged

Kaliumhexacyanoferrat merged 1 commit into
mainfrom
fix/visit-header-after-body

Conversation

@Kaliumhexacyanoferrat

Copy link
Copy Markdown
Collaborator

LambdaVisitConcern read request.Header.Method in its finally block (in IsPage). A lambda that had read a request body with HeaderAccess.Release - any Inline route with a body argument - had released the headers by then, so the read threw Header information can no longer be accessed and the exception replaced the lambda's response with a 500.

Affected: lambdas with analytics switched on (counted && IsPage(...) short-circuits otherwise), every POST with a body. Seen on pages.genhttp.run, whose api/oidc/key could no longer hand out keys to the GenHTTP Pages action.

The method is now captured together with the other headers before the lambda runs, and IsPage takes it as a value.

🤖 Generated with Claude Code

LambdaVisitConcern asked the request for its method in its finally block, to
tell whether the visit was a page. By then a lambda that read a body - an
Inline route with a body argument - had released the headers, so the read
threw "Header information can no longer be accessed", and the exception
replaced whatever the lambda answered with a 500. Only lambdas with
analytics switched on were affected, every POST with a body among them
(GenHTTP Pages could no longer hand out keys to its workflows).

The method is now read with the other headers, before the lambda is asked.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Kaliumhexacyanoferrat
Kaliumhexacyanoferrat merged commit d8a08ce into main Oct 13, 2026
2 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.

1 participant