Bug Description
The promise returned by fetch(redirectedURL, { mode: 'no-cors' }) never resolves.
Reproducible By
import http from 'http'
import { fetch } from 'undici'
const a = http.createServer((req, res) => {
console.log(req.url)
res.writeHead(200).end()
}).listen(8080)
const b = http.createServer((req, res) => {
res.writeHead(301, { Location: `http://localhost:8080${req.url}` }).end()
}).listen(8081);
(async () => {
// Remove `{ mode: 'no-cors' }` and the promise resolves
const response = await fetch('http://localhost:8081/abc', { mode: 'no-cors' })
console.log(response.status)
a.close()
b.close()
})()
Expected Behavior
I expect the promise to resolve, assuming I have not missed anything in the Fetch specification that requires the current behavior.
Logs & Screenshots
Environment
Debian v12.12 / Node v24.10 / undici v7.16.0
Additional context
Bug Description
The promise returned by
fetch(redirectedURL, { mode: 'no-cors' })never resolves.Reproducible By
Expected Behavior
I expect the promise to resolve, assuming I have not missed anything in the Fetch specification that requires the current behavior.
Logs & Screenshots
Environment
Debian v12.12 / Node v24.10 / undici v7.16.0
Additional context