diff options
Diffstat (limited to 'test/wpt/tests/fetch/api/resources/script-with-header.py')
-rw-r--r-- | test/wpt/tests/fetch/api/resources/script-with-header.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/wpt/tests/fetch/api/resources/script-with-header.py b/test/wpt/tests/fetch/api/resources/script-with-header.py new file mode 100644 index 0000000..9a9c70e --- /dev/null +++ b/test/wpt/tests/fetch/api/resources/script-with-header.py @@ -0,0 +1,7 @@ +def main(request, response): + headers = [(b"Content-type", request.GET.first(b"mime"))] + if b"content" in request.GET and request.GET.first(b"content") == b"empty": + content = b'' + else: + content = b"console.log('Script loaded')" + return 200, headers, content |