https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 10a0d21c5403e48ddb5372916f76c34b462e18da authored by Philip Jägenstedt on 29 March 2018, 09:12:14 UTC
Invert (fix) the order of `wpt make-hosts-file` instructions
Tip revision: 10a0d21
echo_client_hints_received.py
def main(request, response):
    """
    Simple handler that sets a response header based on if device-memory
    request header was received or not.
    """

    if "device-memory" in request.headers:
            response.headers.set("device-memory-received", "true")
    if "dpr" in request.headers:
            response.headers.set("dpr-received", "true")
    if "viewport-width" in request.headers:
            response.headers.set("viewport-width-received", "true")
back to top