Repository navigation
test(e2e): stop requiring Content-Length on streamed Route Handler downloads - #9824
Merged
Merged
Conversation
…wnloads Next.js 16.4.5 strips Content-Length and Content-Encoding from every Route Handler response (GHSA-pc58-hwjq-p385); upstream kept that in 16.4.6 and closed the scoped alternative, so a large download now arrives chunked without a declared length. The history suite still proves incremental delivery, the full byte count and the content hash, and checks a declared length whenever one is present.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
[Low impact] This PR appears safe to merge. SummaryUpdates the large-download test to accept responses without
Reviews (1) · Last reviewed commit: "test(e2e): stop requiring Content-Length..." · Reviewed by Greptile |
This was referenced Nov 9, 2026
Merged
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
e2e (project-files)fails on staging and on every PR based on it: the history suite's large-download check expectsContent-Length: 104857601and gets none.Content-LengthandContent-Encodingfrom every Route Handler response for GHSA-pc58-hwjq-p385. AResponseproxied fromfetch()can't be told apart from a synthetic one. 16.4.6 keeps this, and the scoped alternative (Keep Content-Encoding and Content-Length on Route Handler responses vercel/next.js#101201) was closed, so this is the framework's behavior going forward.Client impact
None functional. Every client that reads
Content-Length(text preview, CLI updater and OAuth reader, desktop updater) uses it only as an early size rejection and still enforces its cap while streaming. Browsers lose the progress estimate on large downloads, which is the upstream trade-off.Verification
12ca9d6cbcfails this job;2304295bef(before chore(deps): take the Next.js 16.4.5 security release, patch node-gyp's undici, and refresh in-range patches #9819) passes. The failing check and its error match exactly.Content-Length.