comparison h2_cache.t @ 885:a1e76cca714c

Tests: fixed HTTP/2 tests with proxy cache after a6abbfed42c0.
author Sergey Kandaurov <pluknet@nginx.com>
date Fri, 25 Mar 2016 04:49:25 +0300
parents d1b94c1127d6
children 3ac4036b139d
comparison
equal deleted inserted replaced
884:d1b94c1127d6 885:a1e76cca714c
90 $frames = h2_read($sess, all => [{ sid => $sid, fin => 1 }]); 90 $frames = h2_read($sess, all => [{ sid => $sid, fin => 1 }]);
91 91
92 ($frame) = grep { $_->{type} eq "HEADERS" } @$frames; 92 ($frame) = grep { $_->{type} eq "HEADERS" } @$frames;
93 is($frame->{headers}->{':status'}, 304, 'proxy cache conditional'); 93 is($frame->{headers}->{':status'}, 304, 'proxy cache conditional');
94 94
95 $t->write_file('t.html', 'SEE-THIS');
96
95 # request body with cached response 97 # request body with cached response
96 98
97 $sid = new_stream($sess, { path => '/cache/t.html', body_more => 1 }); 99 $sid = new_stream($sess, { path => '/cache/t.html', body_more => 1 });
98 h2_body($sess, 'TEST'); 100 h2_body($sess, 'TEST');
99 $frames = h2_read($sess, all => [{ sid => $sid, fin => 1 }]); 101 $frames = h2_read($sess, all => [{ sid => $sid, fin => 1 }]);