mirror of
https://github.com/servo/servo.git
synced 2025-08-12 08:55:32 +01:00
Update web-platform-tests to revision 12d3e15e5ecae695e1216c358d613705fbff6b68
This commit is contained in:
parent
78455ec033
commit
5b2ca4d132
424 changed files with 4377 additions and 8656 deletions
|
@ -58,14 +58,15 @@ def main(request, response):
|
|||
|
||||
key = request.GET["key"]
|
||||
stash = request.server.stash
|
||||
path = request.GET.get("path", request.url.split('?'))[0]
|
||||
|
||||
if action == "put":
|
||||
value = request.GET["value"]
|
||||
stash.take(key=key)
|
||||
stash.put(key=key, value=value)
|
||||
stash.take(key=key, path=path)
|
||||
stash.put(key=key, value=value, path=path)
|
||||
response_data = json.dumps({"status": "success", "result": key})
|
||||
elif action == "purge":
|
||||
value = stash.take(key=key)
|
||||
value = stash.take(key=key, path=path)
|
||||
if content_type == "image/png":
|
||||
response_data = open(os.path.join(request.doc_root,
|
||||
"images",
|
||||
|
@ -86,7 +87,7 @@ def main(request, response):
|
|||
else:
|
||||
response_data = "/* purged */"
|
||||
elif action == "take":
|
||||
value = stash.take(key=key)
|
||||
value = stash.take(key=key, path=path)
|
||||
if value is None:
|
||||
status = "allowed"
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue