]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Fix failing pytest modules/http2/test_712_buffering.py:48.
authorRainer Jung <rjung@apache.org>
Thu, 4 Apr 2024 22:19:09 +0000 (22:19 +0000)
committerRainer Jung <rjung@apache.org>
Thu, 4 Apr 2024 22:19:09 +0000 (22:19 +0000)
Do not count lines like "00:12:26.578220 <= Recv data, 0 bytes (0x0)"
(which happen before the final close) as receiving a real chunk.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1916806 13f79535-47bb-0310-9956-ffa450edef68

test/pyhttpd/curl.py

index d377a912387bc964edec293b07ae3e85dc2b60e3..7dcc25bcc80c0ddede8d4ad87292cf3cf994541c 100644 (file)
@@ -112,7 +112,7 @@ class CurlPiper:
         recv_times = []
         for line in "".join(recv_err).split('\n'):
             m = re.match(r'^\s*(\d+:\d+:\d+(\.\d+)?) <= Recv data, (\d+) bytes.*', line)
-            if m:
+            if m and int(m.group(3)) > 0:
                 recv_times.append(datetime.time.fromisoformat(m.group(1)))
         # received as many chunks as we sent
         assert len(chunks) == len(recv_times), "received response not in {0} chunks, but {1}".format(