Skip to content

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

Merged
jlizen merged 1 commit intoaws:mainfrom
sbougerel:main
May 7, 2026
Merged

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

Conversation

@sbougerel
Copy link
Copy Markdown
Contributor

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.
Copy link
Copy Markdown
Contributor

@darklight3it darklight3it left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

@jlizen jlizen merged commit 301e3cd into aws:main May 7, 2026
13 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.

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

3 participants