File tree Expand file tree Collapse file tree 2 files changed +24
-1
lines changed
Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -453,7 +453,7 @@ function filterResponse (response, type) {
453453
454454 return makeFilteredResponse ( response , {
455455 type : 'opaque' ,
456- urlList : Object . freeze ( [ ] ) ,
456+ urlList : [ ] ,
457457 status : 0 ,
458458 statusText : '' ,
459459 body : null
Original file line number Diff line number Diff line change 1+ 'use strict'
2+
3+ const { createServer } = require ( 'node:http' )
4+ const { test } = require ( 'node:test' )
5+ const { fetch } = require ( '../..' )
6+
7+ // https://github.com/nodejs/undici/issues/4647
8+ test ( 'fetch with mode: no-cors does not hang' , async ( t ) => {
9+ const a = createServer ( ( req , res ) => {
10+ res . writeHead ( 200 ) . end ( )
11+ } ) . listen ( 0 )
12+
13+ const b = createServer ( ( req , res ) => {
14+ res . writeHead ( 301 , { Location : `http://localhost:${ a . address ( ) . port } ${ req . url } ` } ) . end ( )
15+ } ) . listen ( 0 )
16+
17+ t . after ( ( ) => {
18+ a . close ( )
19+ b . close ( )
20+ } )
21+
22+ await fetch ( `http://localhost:${ b . address ( ) . port } /abc` , { mode : 'no-cors' } )
23+ } )
You can’t perform that action at this time.
0 commit comments