Files
tubestation/testing/web-platform/tests/common/refresh.py
jugglinmike 6774e9f037 Bug 1661296 [wpt PR 25247] - [fetch] Introduce test generation tool & add more tests for metadata request headers, a=testonly
Automatic update from web-platform-tests
[fetch] Introduce test generation tool & add more tests for metadata request headers (#25247)

--

wpt-commits: 9bbcf3538e88ed04fff2716b471d927777a0e241
wpt-pr: 25247
2022-05-15 20:20:51 +00:00

12 lines
384 B
Python

def main(request, response):
"""
Respond with a blank HTML document and a `Refresh` header which describes
an immediate redirect to the URL specified by the requests `location` query
string parameter
"""
headers = [
(b'Content-Type', b'text/html'),
(b'Refresh', b'0; URL=' + request.GET.first(b'location'))
]
return (200, headers, b'')