Skip to content

Conversation

@Log1x
Copy link
Member

@Log1x Log1x commented May 27, 2025

Setting cookies when sending the response happens too late in the shutdown hook.

It might be worth looking into using Response::sendContent() over Response::send() and then manually filtering/handling appropriate headers in the send_headers hook instead.

Ideally we'd filter out headers such as Cache-Control which causes unexpected behavior as seen in #456.

EDIT: I went ahead and implemented the above.

@Log1x Log1x changed the title 🩹 Send response cookies before shutting down 🩹 Handle response headers before shutting down May 27, 2025
@Log1x Log1x merged commit 8b1dc37 into main May 27, 2025
3 checks passed
@Log1x Log1x deleted the fix/set-pending-cookies-in-response branch May 27, 2025 23:47
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