@@ -26,7 +26,7 @@ select STDERR; $| = 1;
26
26
select STDOUT ; $| = 1;
27
27
28
28
my $t = Test::Nginx-> new()-> has(qw/ http http_v2 proxy rewrite charset gzip/ )
29
- -> plan(144 );
29
+ -> plan(142 );
30
30
31
31
$t -> write_file_expand(' nginx.conf' , <<'EOF' );
32
32
@@ -1017,20 +1017,14 @@ is($frame->{headers}->{':status'}, 200, 'http2_max_concurrent_streams 3');
1017
1017
1018
1018
# invalid connection preface
1019
1019
1020
- $s = Test::Nginx::HTTP2 -> new(port(8080), preface => ' x ' x 16 , pure => 1);
1021
- $frames = $s -> read ( all => [{ type => ' GOAWAY ' }] );
1020
+ TODO: {
1021
+ local $TODO = ' not yet ' unless $t -> has_version( ' 1.25.1 ' );
1022
1022
1023
- ( $frame ) = grep { $_ -> { type } eq " GOAWAY " } @$frames ;
1024
- ok( $frame , ' invalid preface - GOAWAY frame ' );
1025
- is( $frame -> { code }, 1, ' invalid preface - error code ' );
1023
+ like(http( ' x ' x 16 ), qr / 400 Bad Request / , ' invalid preface ' ) ;
1024
+ like(http( ' PRI * HTTP/2.0 ' . CRLF . CRLF . ' x ' x 8 ), qr / 400 Bad Request / ,
1025
+ ' invalid preface 2 ' );
1026
1026
1027
- my $preface = ' PRI * HTTP/2.0' . CRLF . CRLF . ' x' x 8 ;
1028
- $s = Test::Nginx::HTTP2-> new(port(8080), preface => $preface , pure => 1);
1029
- $frames = $s -> read (all => [{ type => ' GOAWAY' }]);
1030
-
1031
- ($frame ) = grep { $_ -> {type } eq " GOAWAY" } @$frames ;
1032
- ok($frame , ' invalid preface 2 - GOAWAY frame' );
1033
- is($frame -> {code }, 1, ' invalid preface 2 - error code' );
1027
+ }
1034
1028
1035
1029
# GOAWAY on SYN_STREAM with even StreamID
1036
1030
0 commit comments