File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -472,7 +472,8 @@ const kNeverIndexFlag = StringFromCharCode(NGHTTP2_NV_FLAG_NO_INDEX);
472
472
const kNoHeaderFlags = StringFromCharCode ( NGHTTP2_NV_FLAG_NONE ) ;
473
473
function mapToHeaders ( map ,
474
474
assertValuePseudoHeader = assertValidPseudoHeader ) {
475
- let ret = '' ;
475
+ let headers = '' ;
476
+ let pseudoHeaders = '' ;
476
477
let count = 0 ;
477
478
const keys = ObjectKeys ( map ) ;
478
479
const singles = new SafeSet ( ) ;
@@ -520,7 +521,7 @@ function mapToHeaders(map,
520
521
err = assertValuePseudoHeader ( key ) ;
521
522
if ( err !== undefined )
522
523
throw err ;
523
- ret = `${ key } \0${ value } \0${ flags } ${ ret } ` ;
524
+ pseudoHeaders + = `${ key } \0${ value } \0${ flags } ` ;
524
525
count ++ ;
525
526
continue ;
526
527
}
@@ -533,16 +534,16 @@ function mapToHeaders(map,
533
534
if ( isArray ) {
534
535
for ( j = 0 ; j < value . length ; ++ j ) {
535
536
const val = String ( value [ j ] ) ;
536
- ret += `${ key } \0${ val } \0${ flags } ` ;
537
+ headers += `${ key } \0${ val } \0${ flags } ` ;
537
538
}
538
539
count += value . length ;
539
540
continue ;
540
541
}
541
- ret += `${ key } \0${ value } \0${ flags } ` ;
542
+ headers += `${ key } \0${ value } \0${ flags } ` ;
542
543
count ++ ;
543
544
}
544
545
545
- return [ ret , count ] ;
546
+ return [ pseudoHeaders + headers , count ] ;
546
547
}
547
548
548
549
class NghttpError extends Error {
You can’t perform that action at this time.
0 commit comments