-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
cannot return HTTP 304 using unstable_singleFetch #9930
Comments
I am also wondering why |
Can you explain your use case for needing a 304? The underlying single fetch |
I was trying to cache that loader response in a CDN, and revalidate via ETag. Am I missing something fundamental? |
Ah ok sorry I thought you were trying to do that programmatically for a single route you could hit directly via
This isn't coming from the polyfill - Node uses undici as it's native
|
Perfect!
Of course, thanks for the clarification. Undici is in the node depencies: https://github.com/nodejs/node/tree/main/deps/undici |
🤖 Hello there, We just published version Thanks! |
It works thanks! But maybe you should do the same for the route itself? Now the On a side note, caching loader responses in singleFetch is very dangerous, if authentication data is returned from a parent route's loader;) |
True - but that's also always been the case for document requests if your loaders have authentication data in them. Single Fetch is aligning document and data requests closer to one another. |
🤖 Hello there, We just published version Thanks! |
I still get this error in Remix 2.14.0 with v3_singleFetch: true @brophdawg11 : TypeError: Response constructor: Invalid response status code 304 in my entry.server.tsx
|
Reproduction
clone https://github.com/linobino1/remix-mvce-304 and run:
you will see:
System Info
Used Package Manager
npm
Expected Behavior
I would expect an empty Response with a status of 304 being returned.
Actual Behavior
The server throws an error
Invalid response status code 304
.The text was updated successfully, but these errors were encountered: