mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Update web-platform-tests to revision 8ba782c9d5a545b850cd8920032cb14cfbab2c35
This commit is contained in:
parent
b17a302356
commit
986610f6ed
91 changed files with 1030 additions and 429 deletions
|
@ -2,7 +2,7 @@ import time
|
|||
|
||||
|
||||
def url_dir(request):
|
||||
return '/'.join(request.url_parts.path.split('/')[:-1]) + '/'
|
||||
return u'/'.join(request.url_parts.path.split(u'/')[:-1]) + u'/'
|
||||
|
||||
|
||||
def stash_write(request, key, value):
|
||||
|
@ -12,24 +12,23 @@ def stash_write(request, key, value):
|
|||
|
||||
|
||||
def main(request, response):
|
||||
stateKey = request.GET.first("stateKey", "")
|
||||
abortKey = request.GET.first("abortKey", "")
|
||||
stateKey = request.GET.first(b"stateKey", b"")
|
||||
abortKey = request.GET.first(b"abortKey", b"")
|
||||
|
||||
if stateKey:
|
||||
stash_write(request, stateKey, 'open')
|
||||
|
||||
response.headers.set("Content-type", "text/plain")
|
||||
response.headers.set(b"Content-type", b"text/plain")
|
||||
response.write_status_headers()
|
||||
|
||||
# Writing an initial 2k so browsers realise it's there. *shrug*
|
||||
response.writer.write("." * 2048)
|
||||
response.writer.write(b"." * 2048)
|
||||
|
||||
while True:
|
||||
if not response.writer.flush():
|
||||
if not response.writer.write(b"."):
|
||||
break
|
||||
if abortKey and request.server.stash.take(abortKey, url_dir(request)):
|
||||
break
|
||||
response.writer.write(".")
|
||||
time.sleep(0.01)
|
||||
|
||||
if stateKey:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue