aboutsummaryrefslogtreecommitdiffstats
path: root/tests/wpt/web-platform-tests/beacon/resources/inspect-header.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/wpt/web-platform-tests/beacon/resources/inspect-header.py')
-rw-r--r--tests/wpt/web-platform-tests/beacon/resources/inspect-header.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/tests/wpt/web-platform-tests/beacon/resources/inspect-header.py b/tests/wpt/web-platform-tests/beacon/resources/inspect-header.py
index e0b0e92cb78..f926ed43fc4 100644
--- a/tests/wpt/web-platform-tests/beacon/resources/inspect-header.py
+++ b/tests/wpt/web-platform-tests/beacon/resources/inspect-header.py
@@ -1,18 +1,18 @@
def main(request, response):
- headers = [("Content-Type", "text/plain")]
- command = request.GET.first("cmd").lower();
- test_id = request.GET.first("id")
- header = request.GET.first("header")
- if command == "put":
- request.server.stash.put(test_id, request.headers.get(header, ""))
+ headers = [(b"Content-Type", b"text/plain")]
+ command = request.GET.first(b"cmd").lower()
+ test_id = request.GET.first(b"id")
+ header = request.GET.first(b"header")
+ if command == b"put":
+ request.server.stash.put(test_id, request.headers.get(header, b""))
- elif command == "get":
+ elif command == b"get":
stashed_header = request.server.stash.take(test_id)
if stashed_header is not None:
- headers.append(("x-request-" + header, stashed_header ))
+ headers.append((b"x-request-" + header, stashed_header))
else:
- response.set_error(400, "Bad Command")
- return "ERROR: Bad Command!"
+ response.set_error(400, u"Bad Command")
+ return u"ERROR: Bad Command!"
- return headers, ""
+ return headers, u""