-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Cookies set in thrown responses are ignored when the CatchBoundary is in a parent route #3157
Comments
This happens because of Because that filtered prefix of routes is the one used to generate the headers: The problem is that, at this stage of the response logic, we don't track that a loader response was thrown or if it was returned in a happy flow (except logging the catch itself and the response data and status). So while it makes sense to skip the data (and headers) of child loaders that ran successfully, as they would be irrelevant because of the CatchBoundary at their parent, the thrown response should be treated as if it is "rendered" (it is what the CatchBoundary "catches") so it's headers should be handled too. |
Fixed by #6475 and will be available in the next release (likely 1.17.0) |
🤖 Hello there, We just published version Thanks! |
wow, it's been a year! thanks for circling back to the task to update! Waiting for the next release to remove my patched solution |
🤖 Hello there, We just published version Thanks! |
🤖 Hello there, We just published version Thanks! |
What version of Remix are you using?
1.4.3
Steps to Reproduce
npx create-remix
and use theJust the basics
andRemix App Server
settings~/app/routes/parent.tsx
:~/app/routes/parent/child.tsx
:npm run dev
curl --head "localhost:3000/parent/child"
curl --head "localhost:3000/parent/child?throw"
Expected Behavior
The Set-Cookie header should be shown in both cases
Actual Behavior
When the response is thrown in a child of a CatchBoundary, Set-Cookie headers are not copied
The text was updated successfully, but these errors were encountered: