File tree 2 files changed +6
-2
lines changed
2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -360,8 +360,7 @@ function isIllegalConnectionSpecificHeader(name, value) {
360
360
case HTTP2_HEADER_TRANSFER_ENCODING :
361
361
return true ;
362
362
case HTTP2_HEADER_TE :
363
- const val = Array . isArray ( value ) ? value . join ( ', ' ) : value ;
364
- return val !== 'trailers' ;
363
+ return value !== 'trailers' ;
365
364
default :
366
365
return false ;
367
366
}
Original file line number Diff line number Diff line change @@ -266,5 +266,10 @@ common.expectsError({
266
266
message : regex
267
267
} ) ( mapToHeaders ( { [ HTTP2_HEADER_TE ] : [ 'abc' ] } ) ) ;
268
268
269
+ common . expectsError ( {
270
+ code : 'ERR_HTTP2_INVALID_CONNECTION_HEADERS' ,
271
+ message : regex
272
+ } ) ( mapToHeaders ( { [ HTTP2_HEADER_TE ] : [ 'abc' , 'trailers' ] } ) ) ;
273
+
269
274
assert ( ! ( mapToHeaders ( { te : 'trailers' } ) instanceof Error ) ) ;
270
275
assert ( ! ( mapToHeaders ( { te : [ 'trailers' ] } ) instanceof Error ) ) ;
You can’t perform that action at this time.
0 commit comments