Update web-platform-tests to revision 8ba782c9d5a545b850cd8920032cb14cfbab2c35

This commit is contained in:
WPT Sync Bot 2020-07-17 08:20:46 +00:00
parent b17a302356
commit 986610f6ed
91 changed files with 1030 additions and 429 deletions

View file

@ -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: