-
Notifications
You must be signed in to change notification settings - Fork 208
Open
Labels
triageThis ticket will be looked at shortlyThis ticket will be looked at shortly
Description
Description
Requests with HTTP 303 status code that do not include a Location header produce the following error:
{
status: 0,
headers: {},
finalUrl: 'http://localhost:3000',
data: '-\u003e \nPost "http://localhost:3000": 303 response missing Location header',
json: [AsyncFunction: json],
text: [AsyncFunction: text],
arrayBuffer: [AsyncFunction: arrayBuffer],
blob: [AsyncFunction: blob]
}
I tested with disableRedirect set to both true and false, but it didn't make any difference.
Here is an actual response from a real website, which uses a custom x-action-redirect header instead of Location:
HTTP/2 303
date: Sun, 12 Oct 2025 14:21:48 GMT
content-type: text/html; charset=utf-8
cf-ray: ...
content-security-policy: default-src 'self' ...; upgrade-insecure-requests;
vary: RSC, Next-Router-State-Tree, Next-Router-Prefetch, Next-Router-Segment-Prefetch, Accept-Encoding
cache-control: no-cache, no-store, max-age=0, must-revalidate
x-action-revalidated: [[],0,0]
x-action-redirect: /en-us/...;push
x-powered-by: Next.js
cf-cache-status: DYNAMIC
server: cloudflare
X-Firefox-Spdy: h2
Main issues:
- Status is set to 0
- Response headers are not returned (even if Location is missing, headers should always be visible)
Issue Type
Bug
Operating System
Windows 10
Node Version
Node 22.x
Golang Version
No response
Relevant Log Output
{
status: 0,
headers: {},
finalUrl: 'http://localhost:3000',
data: '-\u003e \nPost "http://localhost:3000": 303 response missing Location header',
json: [AsyncFunction: json],
text: [AsyncFunction: text],
arrayBuffer: [AsyncFunction: arrayBuffer],
blob: [AsyncFunction: blob]
}
HTTP/2 303
date: Sun, 12 Oct 2025 14:21:48 GMT
content-type: text/html; charset=utf-8
cf-ray: ...
content-security-policy: default-src 'self' ...; upgrade-insecure-requests;
vary: RSC, Next-Router-State-Tree, Next-Router-Prefetch, Next-Router-Segment-Prefetch, Accept-Encoding
cache-control: no-cache, no-store, max-age=0, must-revalidate
x-action-revalidated: [[],0,0]
x-action-redirect: /en-us/...;push
x-powered-by: Next.js
cf-cache-status: DYNAMIC
server: cloudflare
X-Firefox-Spdy: h2Metadata
Metadata
Assignees
Labels
triageThis ticket will be looked at shortlyThis ticket will be looked at shortly