summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/xhr/resources/delay.py
blob: 61a0ed268844841ff0e6a80bd1808c61d144d796 (plain)
1
2
3
4
5
6
7
import time

def main(request, response):
    delay = float(request.GET.first(b"ms", 500))
    time.sleep(delay / 1E3)

    return [(b"Access-Control-Allow-Origin", b"*"), (b"Access-Control-Allow-Methods", b"YO"), (b"Content-type", b"text/plain")], b"TEST_DELAY"