]> 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:20:31 +0000 (22:20 +0000)
committerRainer Jung <rjung@apache.org>
Thu, 4 Apr 2024 22:20:31 +0000 (22:20 +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.

Backport of r1918606 from trunk.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1916807 13f79535-47bb-0310-9956-ffa450edef68

test/pyhttpd/curl.py

index 5a215cd5909d6193bf6153e5c0902612b63c5474..3d7993ffe13960def434a1258e459e39168b1de9 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(