Skip to content

🩹 Handle response headers before shutting down #468

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 27, 2025

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.

1 participant