Skip to content

Conversation

@39george
Copy link

This PR fixes a crash in the cqueues (lua-http) backend when an action sets more than one cookie.

Lapis stores multiple Set-Cookie values as an array in res.headers, but the cqueues adapter was appending header values directly and passed a Lua table to http.headers:append, causing field value invalid. The adapter now flattens table-valued headers and appends each value separately, allowing multiple cookies (and any multi-value header) to work correctly.

Repro: set self.cookies.csrf and self.cookies.theme alongside self.session.* → server crashes.
After: multiple Set-Cookie headers are emitted correctly

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