Skip to content

Join repeated Cookie headers correctly in WsgiToAsgi - #599

Open
xiehuanyi wants to merge 1 commit into
django:mainfrom
xiehuanyi:fix/wsgi-cookie-header-joining-20261012
Open

xiehuanyi wants to merge 1 commit into
django:mainfrom
xiehuanyi:fix/wsgi-cookie-header-joining-20261012

Conversation

@xiehuanyi

Copy link
Copy Markdown

Repeated Cookie headers in an HTTP/2 or HTTP/3 request are currently comma-joined by WsgiToAsgi. For theme=light and session=abc, the WSGI app receives theme=light,session=abc; SimpleCookie parses a single theme value and loses the session cookie.

Join Cookie fields with ; , as required by the ASGI HTTP specification, so both cookies reach the WSGI application. Regression tests cover HTTP/2 and HTTP/3 and check both the header value and parsed cookies.

Validation on Python 3.12.13: the two new cases fail before the fix; all 106 tests pass after it (1 existing xfail). All pre-commit checks pass. Three non-fatal multiprocessing deprecation warnings remain in the full suite.

Developed, reviewed, and tested with AI assistance (Codex).

Copilot AI balanced review requested due to automatic review settings October 12, 2026 08:13

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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.

2 participants