Repository navigation
fix(next): keep route-handler framing for bodies Next did not decode - #9820
waleedlatif1 wants to merge 3 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
[Medium impact] The PR appears safe to merge; no actionable issues were found. SummaryRestores route-handler response headers when
No actionable issues were found. Tests were inspected but not run. Reviews (1) · Last reviewed commit: "fix(next): keep route-handler framing fo..." · Reviewed by Greptile |
|
Your organization has run out of review credits. Add credits to resume code reviews. |
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
|
Superseded. Next.js upstream deliberately strips |
Summary
Content-Length,Content-Encoding, andTransfer-Encodingfrom every Node route-handler response. Upstream's target is a fetched response returned unchanged: fetch decodes the body but keeps the original coding and length, so forwarding them misframes the bodyContent-Encoding: noneno-compression marker is dropped toonext@16.4.5patch: the CommonJS and ESMsendResponsebuilds and the copy prebundled intocompiled/next-server/server.runtime.prod.js:Content-Encodingnames a real coding keeps upstream's behavior; its length and coding are droppedidentity/none, was not decoded, so itsContent-Lengthand coding are forwardedTransfer-Encodingis never forwardedpatches/README.mdturbo.jsonnow hashespatches/**into every task (globalDependencies).bun.lockrecords only a patch's path, so editing a patch left the app build hash unchanged and CI replayed a cached build of unpatched Next; the first CI run of this PR did exactly that. With the change, editing the patch changes the@sim/app#buildhash, and restoring the file restores itType of Change
Testing
test:headers:e2esends real responses through both builds ofsendResponseover loopback HTTP; 26/26 passidentity, andnonechecks fail against unpatched 16.4.5nextfrom the committed patch file and reran the suiteturbo run build --dry=json: the@sim/app#buildhash was unchanged by a patch edit before theturbo.jsonchange and changes with itChecklist
test-auditauthoring gate)