mirror of
https://github.com/servo/servo.git
synced 2025-08-12 08:55:32 +01:00
Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444
This commit is contained in:
parent
25e8bf69e6
commit
665817d2a6
35333 changed files with 1818077 additions and 16036 deletions
|
@ -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, ""
|
Loading…
Add table
Add a link
Reference in a new issue