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
index 75a22b1..482159b 100644
--- a/h2_proxy_request_buffering.t
+++ b/h2_proxy_request_buffering.t
@@ -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 --git a/h2_proxy_request_buffering_ssl.t b/h2_proxy_request_buffering_ssl.t
index b677b6e..774aefb 100644
--- a/h2_proxy_request_buffering_ssl.t
+++ b/h2_proxy_request_buffering_ssl.t
@@ -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;
}