mirror of
https://github.com/servo/servo.git
synced 2025-08-09 15:35:34 +01:00
Update web-platform-tests to revision ac12b3e9488edb436f063b11213e954ae62d5a5e
This commit is contained in:
parent
65370f17c9
commit
b56a3b8e69
111 changed files with 3122 additions and 68 deletions
|
@ -0,0 +1,17 @@
|
|||
import os.path
|
||||
import time
|
||||
|
||||
def main(request, response):
|
||||
name = request.GET.first("name")
|
||||
sleepTime = float(request.GET.first("sleep")) / 1E3
|
||||
|
||||
time.sleep(sleepTime)
|
||||
|
||||
path = os.path.join(os.path.dirname(__file__), name)
|
||||
body = open(path, "rb").read()
|
||||
|
||||
response.headers.set("Content-Type", "image")
|
||||
response.headers.set("Content-Length", len(body))
|
||||
response.headers.set("Cache-control", "no-cache, must-revalidate")
|
||||
|
||||
response.content = body;
|
Loading…
Add table
Add a link
Reference in a new issue