Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444

This commit is contained in:
Josh Matthews 2017-04-17 12:06:02 +10:00 committed by Anthony Ramine
parent 25e8bf69e6
commit 665817d2a6
35333 changed files with 1818077 additions and 16036 deletions

View file

@ -0,0 +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, ""))
elif command == "get":
stashed_header = request.server.stash.take(test_id)
if stashed_header is not None:
headers.append(("x-request-" + header, stashed_header ))
else:
response.set_error(400, "Bad Command")
return "ERROR: Bad Command!"
return headers, ""