Replies: 1 comment 9 replies
-
Hello! It seems that Next.js removes this header from the API routes https://github.com/vercel/next.js/blob/canary/packages/next/server/api-utils/node.ts#L370 for 204 and 304 status. Are these the statuses you are returning? It might be the case because of a cache. |
Beta Was this translation helpful? Give feedback.
9 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm not sure if I have a true issue here or not, as I don't know if I'm just doing something wrong, or if there is a real issue with Next.
I have a simple requirement to provide a % complete progress bar on a resource download. Everything works except the progress never moves from zero because content-length is not being set on responses from my NextJS API route, so Axios cannot compute the
total
value in theonDownloadProgress
handler input.When I try to set the content-length manually in the response, it is removed. I have confirmed I can set other header values.
How can I enable NextJS API routes to return valid content-length values? Thanks!
Beta Was this translation helpful? Give feedback.
All reactions