# 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 --git a/h2_proxy_request_buffering.t b/h2_proxy_request_buffering.t --- a/h2_proxy_request_buffering.t +++ b/h2_proxy_request_buffering.t @@ -240,6 +240,8 @@ sub get_body { $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 --git a/h2_proxy_request_buffering_ssl.t b/h2_proxy_request_buffering_ssl.t --- a/h2_proxy_request_buffering_ssl.t +++ b/h2_proxy_request_buffering_ssl.t @@ -245,6 +245,8 @@ sub get_body { $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; }