mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-11 21:58:41 +02:00
Automatic update from web-platform-testsRun autopep8 on *.py in cors, fetch and xhr (#11116) ``` find cors fetch xhr -name '*.py' | xargs autopep8 --in-place --max-line-length 1000 ``` Then manually pick the "good" changes, ignoring some whitespace stuff. -- wpt-commits: 15b8e55fa2a0fbf0851cb8e0846e0320e319c852 wpt-pr: 11116
14 lines
430 B
Python
14 lines
430 B
Python
import time
|
|
|
|
def main(request, response):
|
|
delay = float(request.GET.first("ms", 500)) / 1E3
|
|
count = int(request.GET.first("count", 50))
|
|
# Read request body
|
|
request.body
|
|
time.sleep(delay)
|
|
response.headers.set("Content-type", "text/plain")
|
|
response.write_status_headers()
|
|
time.sleep(delay)
|
|
for i in xrange(count):
|
|
response.writer.write_content("TEST_TRICKLE\n")
|
|
time.sleep(delay)
|