[test] Fix proxy-request-with-middleware deploy test - #98553
Merged
Conversation
Contributor
Tests PassedCommit: 6011e03 |
eps1lon
force-pushed
the
sebbie/deploy-test-node-fetch
branch
from
September 11, 2026 11:00
4be23bb to
29a8028
Compare
eps1lon
force-pushed
the
sebbie/deploy-test-node-fetch
branch
from
September 11, 2026 11:07
29a8028 to
6011e03
Compare
eps1lon
commented
Sep 11, 2026
| import { fetchViaHTTP } from 'next-test-utils' | ||
| import { FileRef, nextTestSetup } from 'e2e-utils' | ||
|
|
||
| // forceful deploy test v1 |
Member
Author
There was a problem hiding this comment.
change detection is currently crude so this was required to get confirmation from a real run: https://github.com/vercel/next.js/actions/runs/34592487556/job/103242566944?pr=98553#step:35:102
eps1lon
marked this pull request as ready for review
September 11, 2026 11:33
unstubbable
approved these changes
Sep 11, 2026
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.
The fixture's API route proxies the incoming request to
http://<host>/api/post. On Vercel, that plain-HTTP hop hits the edge's http→https upgrade and the handler pipes the resulting 308 back to the test client, which then has to replay the POST body across the redirect. Node.js' fetch implementation cannot replay bodies across 307/308 redirects and fails the request withUND_ERR_REQ_CONTENT_LENGTH_MISMATCH, which broke this test in deploy mode after the test harness switched fromnode-fetchto globalfetchin #98195.This change proxies over
httpswhenVERCEL_URLis set so no client-visible redirect occurs, while local dev and start modes are unaffected since they keep using plain HTTP.Fixes
-- https://github.com/vercel/next.js/actions/runs/34543344283/job/103105861941#step:35:555