1
0
Fork 0
firefox/testing/web-platform/tests/speculation-rules/prerender/resources/echo-subresource-client-hints-received.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

15 lines
476 B
Python

""" Handle the sub-resource requests and attach the received client info to
the response.
"""
def main(request, response):
response.status = 200
# Echo the received CH headers.
response.headers.set(
b"server_received_bitness",
"true" if b"sec-ch-ua-bitness" in request.headers else "false")
response.headers.set(
b"server_received_full_version_list", "true"
if b"sec-ch-ua-full-version-list" in request.headers else "false")