# HG changeset patch # User Sergey Kandaurov # Date 1570720502 -10800 # Node ID 787d904bdfe0388f6b4944aa1260f653b18ab92b # Parent fca71a8ebf6d82d2e3b93009dffd5aa0cedd580c Tests: fixed reading chunked body in HTTP/2 unbuffered body tests. Previously, tests didn't expect that a final chunk can be sent separately. diff -r fca71a8ebf6d -r 787d904bdfe0 h2_proxy_request_buffering.t --- a/h2_proxy_request_buffering.t Thu Oct 10 14:49:26 2019 +0300 +++ b/h2_proxy_request_buffering.t Thu Oct 10 18:15:02 2019 +0300 @@ -240,6 +240,8 @@ $got += $chunked ? hex $_ : $_ for $chunked ? $body =~ /(\w+)\x0d\x0a?\w+\x0d\x0a?/g : length($body); + next if $chunked && !$extra{body_more} + && $buf !~ /^0\x0d\x0a?/m; last if $got >= $len; } diff -r fca71a8ebf6d -r 787d904bdfe0 h2_proxy_request_buffering_ssl.t --- a/h2_proxy_request_buffering_ssl.t Thu Oct 10 14:49:26 2019 +0300 +++ b/h2_proxy_request_buffering_ssl.t Thu Oct 10 18:15:02 2019 +0300 @@ -245,6 +245,8 @@ $got += $chunked ? hex $_ : $_ for $chunked ? $body =~ /(\w+)\x0d\x0a?\w+\x0d\x0a?/g : length($body); + next if $chunked && !$extra{body_more} + && $buf !~ /^0\x0d\x0a?/m; last if $got >= $len; }