comparison h2.t @ 779:ca2db52ae97f

Tests: fix and speed up h2.t tests by waiting for proper data.
author Sergey Kandaurov <pluknet@nginx.com>
date Fri, 06 Nov 2015 16:25:15 +0300
parents 3fc382902cba
children d0a3444c21a6
comparison
equal deleted inserted replaced
778:9e00ab661e87 779:ca2db52ae97f
2383 2383
2384 $sid2 = new_stream($sess, { path => '/t2.html' }); 2384 $sid2 = new_stream($sess, { path => '/t2.html' });
2385 h2_read($sess, all => [{ sid => $sid2, fin => 0x4 }]); 2385 h2_read($sess, all => [{ sid => $sid2, fin => 0x4 }]);
2386 2386
2387 my $sid3 = new_stream($sess, { path => '/t2.html' }); 2387 my $sid3 = new_stream($sess, { path => '/t2.html' });
2388 h2_read($sess, all => [{ sid => $sid2, fin => 0x4 }]); 2388 h2_read($sess, all => [{ sid => $sid3, fin => 0x4 }]);
2389 2389
2390 h2_window($sess, 2**16, 1); 2390 h2_window($sess, 2**16, 1);
2391 h2_window($sess, 2**16, 3); 2391 h2_window($sess, 2**16, 3);
2392 h2_window($sess, 2**16, 5); 2392 h2_window($sess, 2**16, 5);
2393 h2_window($sess, 2**16); 2393 h2_window($sess, 2**16);
2415 2415
2416 $sid2 = new_stream($sess, { path => '/t2.html' }); 2416 $sid2 = new_stream($sess, { path => '/t2.html' });
2417 h2_read($sess, all => [{ sid => $sid2, fin => 0x4 }]); 2417 h2_read($sess, all => [{ sid => $sid2, fin => 0x4 }]);
2418 2418
2419 $sid3 = new_stream($sess, { path => '/t2.html' }); 2419 $sid3 = new_stream($sess, { path => '/t2.html' });
2420 h2_read($sess, all => [{ sid => $sid2, fin => 0x4 }]); 2420 h2_read($sess, all => [{ sid => $sid3, fin => 0x4 }]);
2421 2421
2422 h2_window($sess, 2**16, 1); 2422 h2_window($sess, 2**16, 1);
2423 h2_window($sess, 2**16, 3); 2423 h2_window($sess, 2**16, 3);
2424 h2_window($sess, 2**16, 5); 2424 h2_window($sess, 2**16, 5);
2425 h2_window($sess, 2**16); 2425 h2_window($sess, 2**16);
2692 { name => ':method', value => 'GET', mode => 0 }, 2692 { name => ':method', value => 'GET', mode => 0 },
2693 { name => ':scheme', value => 'http', mode => 0 }, 2693 { name => ':scheme', value => 'http', mode => 0 },
2694 { name => ':path', value => '/proxy2/', mode => 1 }, 2694 { name => ':path', value => '/proxy2/', mode => 1 },
2695 { name => ':authority', value => 'localhost', mode => 1 }, 2695 { name => ':authority', value => 'localhost', mode => 1 },
2696 { name => 'x-foo', value => "x-bar\r\nreferer:see-this", mode => 2 }]}); 2696 { name => 'x-foo', value => "x-bar\r\nreferer:see-this", mode => 2 }]});
2697 $frames = h2_read($sess, all => [{ sid => $sid, fin => 1 }]); 2697 $frames = h2_read($sess, all => [{ type => 'RST_STREAM' }]);
2698 2698
2699 # 10.3. Intermediary Encapsulation Attacks 2699 # 10.3. Intermediary Encapsulation Attacks
2700 # An intermediary therefore cannot translate an HTTP/2 request or response 2700 # An intermediary therefore cannot translate an HTTP/2 request or response
2701 # containing an invalid field name into an HTTP/1.1 message. 2701 # containing an invalid field name into an HTTP/1.1 message.
2702 2702