comparison h2_proxy_request_buffering.t @ 1519:787d904bdfe0

Tests: fixed reading chunked body in HTTP/2 unbuffered body tests. Previously, tests didn't expect that a final chunk can be sent separately.
author Sergey Kandaurov <pluknet@nginx.com>
date Thu, 10 Oct 2019 18:15:02 +0300
parents 4e48bf51714f
children 236d038dc04a
comparison
equal deleted inserted replaced
1518:fca71a8ebf6d 1519:787d904bdfe0
238 238
239 my $got = 0; 239 my $got = 0;
240 $got += $chunked ? hex $_ : $_ for $chunked 240 $got += $chunked ? hex $_ : $_ for $chunked
241 ? $body =~ /(\w+)\x0d\x0a?\w+\x0d\x0a?/g 241 ? $body =~ /(\w+)\x0d\x0a?\w+\x0d\x0a?/g
242 : length($body); 242 : length($body);
243 next if $chunked && !$extra{body_more}
244 && $buf !~ /^0\x0d\x0a?/m;
243 last if $got >= $len; 245 last if $got >= $len;
244 } 246 }
245 247
246 return $body; 248 return $body;
247 }; 249 };