summaryrefslogtreecommitdiff
path: root/http.py
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2020-07-19 10:32:08 +0000
committerLars Wirzenius <liw@liw.fi>2020-07-19 10:32:08 +0000
commitf06b0bccfdb7459be0947a6fd6f726eba4bcf92d (patch)
tree7fafc5f2d22eaf68c9dcfea5a74fe03d6b0676c8 /http.py
parentf1590591451f135ca903e20f24ca5a9d0e7fba14 (diff)
parentb130e74f187b2ba22db6654508a6e7e4c721a16e (diff)
downloadewww-f06b0bccfdb7459be0947a6fd6f726eba4bcf92d.tar.gz
Merge branch 'serve-files' into 'master'
Serve files See merge request larswirzenius/ewww!7
Diffstat (limited to 'http.py')
-rw-r--r--http.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/http.py b/http.py
index fd552a6..5cff887 100644
--- a/http.py
+++ b/http.py
@@ -24,7 +24,8 @@ def http_request(ctx, host=None, method=None, url=None):
# Check status code of latest HTTP request.
def http_status_code_is(ctx, code=None):
- logging.debug(f"Verifying status code of previous HTTP request is {code}")
+ logging.debug(f"Verifying status code of previous HTTP request is {code}")
+ logging.debug(f" stderr={ctx['stderr']}")
pattern = f"\n< HTTP/2 {code} "
assert_eq(pattern in ctx["stderr"], True)
@@ -40,6 +41,7 @@ def http_header_is(ctx, header=None, value=None):
# Check a HTTP body response for latest request has a given value.
def http_body_is(ctx, body=None):
logging.debug(f"Verifying response body is {body!r}")
+ logging.debug(f" actual body={ctx['stdout']!r}")
s = ctx["stdout"]
body = body.encode("UTF8").decode("unicode-escape")
assert_eq(body, s)