@@ -21,8 +21,8 @@ describe('req.host', () => {
2121 describe ( 'when less then HTTP/2' , ( ) => {
2222 it ( 'should not use :authority header' , ( ) => {
2323 const req = request ( {
24- ' httpVersionMajor' : 1 ,
25- ' httpVersion' : '1.1'
24+ httpVersionMajor : 1 ,
25+ httpVersion : '1.1'
2626 } ) ;
2727 req . header [ ':authority' ] = 'foo.com:3000' ;
2828 req . header . host = 'bar.com:8000' ;
@@ -33,8 +33,8 @@ describe('req.host', () => {
3333 describe ( 'when HTTP/2' , ( ) => {
3434 it ( 'should use :authority header' , ( ) => {
3535 const req = request ( {
36- ' httpVersionMajor' : 2 ,
37- ' httpVersion' : '2.0'
36+ httpVersionMajor : 2 ,
37+ httpVersion : '2.0'
3838 } ) ;
3939 req . header [ ':authority' ] = 'foo.com:3000' ;
4040 req . header . host = 'bar.com:8000' ;
@@ -43,8 +43,8 @@ describe('req.host', () => {
4343
4444 it ( 'should use host header as fallback' , ( ) => {
4545 const req = request ( {
46- ' httpVersionMajor' : 2 ,
47- ' httpVersion' : '2.0'
46+ httpVersionMajor : 2 ,
47+ httpVersion : '2.0'
4848 } ) ;
4949 req . header . host = 'bar.com:8000' ;
5050 assert . strictEqual ( req . host , 'bar.com:8000' ) ;
@@ -62,8 +62,8 @@ describe('req.host', () => {
6262
6363 it ( 'should be ignored on HTTP/2' , ( ) => {
6464 const req = request ( {
65- ' httpVersionMajor' : 2 ,
66- ' httpVersion' : '2.0'
65+ httpVersionMajor : 2 ,
66+ httpVersion : '2.0'
6767 } ) ;
6868 req . header [ 'x-forwarded-host' ] = 'proxy.com:8080' ;
6969 req . header [ ':authority' ] = 'foo.com:3000' ;
@@ -83,8 +83,8 @@ describe('req.host', () => {
8383
8484 it ( 'should be used on HTTP/2' , ( ) => {
8585 const req = request ( {
86- ' httpVersionMajor' : 2 ,
87- ' httpVersion' : '2.0'
86+ httpVersionMajor : 2 ,
87+ httpVersion : '2.0'
8888 } ) ;
8989 req . app . proxy = true ;
9090 req . header [ 'x-forwarded-host' ] = 'proxy.com:8080' ;
0 commit comments