Repository navigation
Read the method of a visit before the lambda takes the headers - #117
Merged
Merged
Conversation
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>
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.
LambdaVisitConcernreadrequest.Header.Methodin itsfinallyblock (inIsPage). A lambda that had read a request body withHeaderAccess.Release- any Inline route with a body argument - had released the headers by then, so the read threwHeader information can no longer be accessedand 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 onpages.genhttp.run, whoseapi/oidc/keycould 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
IsPagetakes it as a value.🤖 Generated with Claude Code