summaryrefslogtreecommitdiff
path: root/test/pyhttpd
diff options
context:
space:
mode:
authorStefan Eissing <icing@apache.org>2021-10-13 16:30:44 +0000
committerStefan Eissing <icing@apache.org>2021-10-13 16:30:44 +0000
commit959dabfd836c5d20133ab4c24eab17a37874e4df (patch)
tree951cf3defca15954fc7ad5c92743b0a97339827e /test/pyhttpd
parent9b432e0ce0705e6cd5f7e9b635452f584554047f (diff)
downloadhttpd-959dabfd836c5d20133ab4c24eab17a37874e4df.tar.gz
* test/modules/http2: marking 3 test cases for skip as they
fail on travis and need further analysis. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1894200 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/pyhttpd')
-rw-r--r--test/pyhttpd/nghttp.py38
1 files changed, 19 insertions, 19 deletions
diff --git a/test/pyhttpd/nghttp.py b/test/pyhttpd/nghttp.py
index 2207dd31b3..61aef45e49 100644
--- a/test/pyhttpd/nghttp.py
+++ b/test/pyhttpd/nghttp.py
@@ -84,12 +84,12 @@ class Nghttp:
if len(l) == 0:
body += '\n'
continue
- m = re.match(r'\[.*] recv \(stream_id=(\d+)\) (\S+): (\S*)', l)
+ m = re.match(r'\[(.*)] recv \(stream_id=(\d+)\) (\S+): (\S*)', l)
if m:
- s = self.get_stream(streams, m.group(1))
- hname = m.group(2)
- hval = m.group(3)
- print("stream %d header %s: %s" % (s["id"], hname, hval))
+ s = self.get_stream(streams, m.group(2))
+ hname = m.group(3)
+ hval = m.group(4)
+ print(f"{m.group(1)}: stream {s['id']} header {hname}: {hval}")
header = s["header"]
if hname in header:
header[hname] += ", %s" % hval
@@ -98,11 +98,11 @@ class Nghttp:
body = ''
continue
- m = re.match(r'\[.*] recv HEADERS frame <.* stream_id=(\d+)>', l)
+ m = re.match(r'\[(.*)] recv HEADERS frame <.* stream_id=(\d+)>', l)
if m:
- s = self.get_stream(streams, m.group(1))
+ s = self.get_stream(streams, m.group(2))
if s:
- print("stream %d: recv %d header" % (s["id"], len(s["header"])))
+ print(f"{m.group(1)}: recv HEADERS on stream {s['id']} with {len(s['header'])} fields")
response = s["response"]
hkey = "header"
if "header" in response:
@@ -121,13 +121,13 @@ class Nghttp:
body = ''
continue
- m = re.match(r'(.*)\[.*] recv DATA frame <length=(\d+), .*stream_id=(\d+)>', l)
+ m = re.match(r'(.*)\[(.*)] recv DATA frame <length=(\d+), .*stream_id=(\d+)>', l)
if m:
- s = self.get_stream(streams, m.group(3))
+ s = self.get_stream(streams, m.group(4))
body += m.group(1)
- blen = int(m.group(2))
+ blen = int(m.group(3))
if s:
- print("stream %d: %d DATA bytes added" % (s["id"], blen))
+ print(f"{m.group(2)}: recv DATA on stream {s['id']} with {blen} bytes")
padlen = 0
if len(lines) > lidx + 2:
mpad = re.match(r' +\(padlen=(\d+)\)', lines[lidx+2])
@@ -140,14 +140,14 @@ class Nghttp:
skip_indents = True
continue
- m = re.match(r'\[.*] recv PUSH_PROMISE frame <.* stream_id=(\d+)>', l)
+ m = re.match(r'\[(.*)] recv PUSH_PROMISE frame <.* stream_id=(\d+)>', l)
if m:
- s = self.get_stream(streams, m.group(1))
+ s = self.get_stream(streams, m.group(2))
if s:
# headers we have are request headers for the PUSHed stream
# these have been received on the originating stream, the promised
# stream id it mentioned in the following lines
- print("stream %d: %d PUSH_PROMISE header" % (s["id"], len(s["header"])))
+ print(f"{m.group(1)}: recv PUSH_PROMISE on stream {s['id']} with {len(s['header'])} header")
if len(lines) > lidx+2:
m2 = re.match(r'\s+\(.*promised_stream_id=(\d+)\)', lines[lidx+2])
if m2:
@@ -157,16 +157,16 @@ class Nghttp:
s["header"] = {}
continue
- m = re.match(r'(.*)\[.*] recv (\S+) frame <length=(\d+), .*stream_id=(\d+)>', l)
+ m = re.match(r'(.*)\[(.*)] recv (\S+) frame <length=(\d+), .*stream_id=(\d+)>', l)
if m:
- print("recv frame %s on stream %s" % (m.group(2), m.group(4)))
+ print(f"{m.group(2)}: recv frame {m.group(3)} on stream {m.group(5)}")
body += m.group(1)
skip_indents = True
continue
- m = re.match(r'(.*)\[.*] send (\S+) frame <length=(\d+), .*stream_id=(\d+)>', l)
+ m = re.match(r'(.*)\[(.*)] send (\S+) frame <length=(\d+), .*stream_id=(\d+)>', l)
if m:
- print("send frame %s on stream %s" % (m.group(2), m.group(4)))
+ print(f"{m.group(2)}: send frame {m.group(3)} on stream {m.group(5)}")
body += m.group(1)
skip_indents = True
continue