@@ -150,20 +150,22 @@ sent. Dropping the headers from every response also strips the declared length
150150from file downloads, which then arrive chunked with no size, and the
151151` Content-Encoding: none ` marker that keeps streaming responses uncompressed.
152152
153- The same file's patch narrows that rule in ` sendResponse ` , in both the CommonJS
154- and ESM builds. A response whose ` Content-Encoding ` names a real coding keeps
153+ The same file's patch narrows that rule in ` sendResponse ` : the CommonJS and ESM
154+ module builds, and the copy prebundled into
155+ ` compiled/next-server/server.runtime.prod.js ` , which ` next start ` runs. A response whose ` Content-Encoding ` names a real coding keeps
155156upstream's behavior: its length and coding are dropped. A response with no coding,
156157or with ` identity ` /` none ` , was not decoded, so its ` Content-Length ` and coding are
157158forwarded. ` Transfer-Encoding ` is never forwarded; Node frames the response
158159itself. Route handlers, App Page rendering, and the edge runtime are otherwise
159160unchanged.
160161
161- ` test:headers:e2e ` sends real responses through both builds of ` sendResponse `
162- over loopback HTTP. The unencoded, ` identity ` , and ` none ` checks fail against
162+ ` test:headers:e2e ` sends real responses through both module builds of
163+ ` sendResponse ` over loopback HTTP. The unencoded, ` identity ` , and ` none ` checks fail against
163164unpatched 16.4.5. The decoded-body and transfer-coding checks fail when their
164165guards are removed; forwarding a decoded body's stale length leaves the client
165166unable to parse the connection. The project-files E2E's large-download check
166- asserts the declared length of a 100 MB file served through the running app.
167+ covers the production runtime: it asserts the declared length of a 100 MB file
168+ served by the built app.
167169
168170Remove this part of the patch when upstream forwards framing for undecoded
169171route-handler bodies, and keep both regression checks.
0 commit comments