summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorStefan Eissing <icing@apache.org>2022-07-02 08:58:26 +0000
committerStefan Eissing <icing@apache.org>2022-07-02 08:58:26 +0000
commitea52642168c2ee1d2ffdc2e4a2bef85320619471 (patch)
treed9c91938bc4ca118069399b53df6a9e9e4dcf41b /test
parenta63e1f45bdd6688efd5f9e00821634ee7755c055 (diff)
downloadhttpd-ea52642168c2ee1d2ffdc2e4a2bef85320619471.tar.gz
*) test: improved nghttp client output parsing.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1902407 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test')
-rw-r--r--test/pyhttpd/nghttp.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/test/pyhttpd/nghttp.py b/test/pyhttpd/nghttp.py
index 3927bc34ff..84b8f20c6f 100644
--- a/test/pyhttpd/nghttp.py
+++ b/test/pyhttpd/nghttp.py
@@ -80,6 +80,7 @@ class Nghttp:
# chunk output into lines. nghttp mixes text
# meta output with bytes from the response body.
lines = [l.decode() for l in btext.split(b'\n')]
+
for lidx, l in enumerate(lines):
if len(l) == 0:
body += '\n'
@@ -96,7 +97,6 @@ class Nghttp:
header[hname] += ", %s" % hval
else:
header[hname] = hval
- body = ''
continue
m = re.match(r'(.*)\[.*] recv HEADERS frame <.* stream_id=(\d+)>', l)
@@ -120,7 +120,6 @@ class Nghttp:
response["previous"] = prev
response[hkey] = s["header"]
s["header"] = {}
- body = ''
continue
m = re.match(r'(.*)\[.*] recv DATA frame <length=(\d+), .*stream_id=(\d+)>', l)
@@ -179,8 +178,8 @@ class Nghttp:
if '[' != l[0]:
skip_indents = None
- body += l + '\n'
-
+ body += l + '\n'
+
# the main request is done on the lowest odd numbered id
main_stream = 99999999999
for sid in streams: