File tree 1 file changed +11
-8
lines changed
1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -41,18 +41,21 @@ const options = {
41
41
cert : fs . readFileSync ( `${ common . fixturesDir } /keys/agent1-cert.pem` )
42
42
} ;
43
43
44
- const server = https . createServer ( options , common . mustCall ( function ( req , res ) {
44
+ const server = https . createServer ( options , common . mustCall ( ( req , res ) => {
45
45
assert . strictEqual ( 'GET' , req . method ) ;
46
46
assert . strictEqual ( '/foo?bar' , req . url ) ;
47
47
res . writeHead ( 200 , { 'Content-Type' : 'text/plain' } ) ;
48
48
res . write ( 'hello\n' ) ;
49
49
res . end ( ) ;
50
- server . close ( ) ;
51
50
} , 3 ) ) ;
52
51
53
- server . listen ( 0 , function ( ) {
54
- const u = `https://127.0.0.1:${ this . address ( ) . port } /foo?bar` ;
55
- https . get ( u ) ;
56
- https . get ( url . parse ( u ) ) ;
57
- https . get ( new URL ( u ) ) ;
58
- } ) ;
52
+ server . listen ( 0 , common . mustCall ( ( ) => {
53
+ const u = `https://${ common . localhostIPv4 } :${ server . address ( ) . port } /foo?bar` ;
54
+ https . get ( u , common . mustCall ( ( ) => {
55
+ https . get ( url . parse ( u ) , common . mustCall ( ( ) => {
56
+ https . get ( new URL ( u ) , common . mustCall ( ( ) => {
57
+ server . close ( ) ;
58
+ } ) ) ;
59
+ } ) ) ;
60
+ } ) ) ;
61
+ } ) ) ;
You can’t perform that action at this time.
0 commit comments