File tree Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -42,13 +42,20 @@ server.listen(0, common.mustCall(function() {
4242 response . removeHeader ( denormalised ) ;
4343 assert . strictEqual ( response . hasHeader ( denormalised ) , false ) ;
4444
45- assert . throws ( function ( ) {
46- response . setHeader ( ':status' , 'foobar' ) ;
47- } , common . expectsError ( {
48- code : 'ERR_HTTP2_PSEUDOHEADER_NOT_ALLOWED' ,
49- type : Error ,
50- message : 'Cannot set HTTP/2 pseudo-headers'
51- } ) ) ;
45+ [
46+ ':status' ,
47+ ':method' ,
48+ ':path' ,
49+ ':authority' ,
50+ ':scheme'
51+ ] . forEach ( ( header ) => assert . throws (
52+ ( ) => response . setHeader ( header , 'foobar' ) ,
53+ common . expectsError ( {
54+ code : 'ERR_HTTP2_PSEUDOHEADER_NOT_ALLOWED' ,
55+ type : Error ,
56+ message : 'Cannot set HTTP/2 pseudo-headers'
57+ } )
58+ ) ) ;
5259 assert . throws ( function ( ) {
5360 response . setHeader ( real , null ) ;
5461 } , common . expectsError ( {
You can’t perform that action at this time.
0 commit comments