summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/websockets/cookies/support/set-cookie.py
blob: 71cd8bca607c5114b9ffb8cb1bb716b9ccd2ac07 (plain)
1
2
3
4
5
6
7
from urllib.parse import unquote

from wptserve.utils import isomorphic_encode

def main(request, response):
    response.headers.set(b'Set-Cookie', isomorphic_encode(unquote(request.url_parts.query)))
    return [(b"Content-Type", b"text/plain")], b""