1
0
Fork 0
firefox/testing/web-platform/tests/fetch/compression-dictionary/resources/echo-headers.py
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

10 lines
314 B
Python

import json
def main(request, response):
response.headers.set(b"Access-Control-Allow-Origin", b"*")
headers = {}
for header in request.headers:
key = header.decode('utf-8')
value = request.headers.get(header).decode('utf-8')
headers[key] = value
return json.dumps(headers)