Skip to content

fix(lambda-http): into_api_gateway_v2_request joins cookies with "; "#1143

Open
sbougerel wants to merge 1 commit intoaws:mainfrom
sbougerel:main
Open

fix(lambda-http): into_api_gateway_v2_request joins cookies with "; "#1143
sbougerel wants to merge 1 commit intoaws:mainfrom
sbougerel:main

Conversation

@sbougerel
Copy link
Copy Markdown

into_api_gateway_v2_request reconstructs the Cookie header by joining the cookies array from the API Gateway v2 event payload with ";" (no space). This violates RFC 6265 §4.2.1, which mandates "; " (semicolon followed by a space) as the cookie-pair separator. The result is a non-compliant Cookie header that breaks any downstream cookie parser that follows the spec strictly like BetterAuth.

📬 Issue #, if available:

Closes #1142

✍️ Description of changes:

The Cookie header reconstructed from into_api_gateway_v2_request now joins pairs with "; " to produce a spec-compliant value:

cookie1=value1; cookie2=value2

The corresponding test was updated.

🔏 By submitting this pull request

  • I confirm that I've ran cargo +nightly fmt.
  • I confirm that I've ran cargo clippy --fix.
  • I confirm that I've made a best effort attempt to update all relevant documentation.
  • I confirm that my contribution is made under the terms of the Apache 2.0 license.

into_api_gateway_v2_request reconstructs the Cookie header by joining the cookies array from the API Gateway v2 event payload with ";" (no space). This violates RFC 6265 §4.2.1, which mandates "; " (semicolon followed by a space) as the cookie-pair separator. The result is a non-compliant Cookie header that breaks any downstream cookie parser that follows the spec strictly like BetterAuth.
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.

into_api_gateway_v2_request joins cookies with ";" instead of "; ", violating RFC 6265 and breaking strict parsers

1 participant