trisquel-icecat/icecat/testing/web-platform/tests/device-bound-session-credentials/set_cookie.py
2025-10-06 02:35:48 -06:00

8 lines
367 B
Python

import importlib
session_manager = importlib.import_module('device-bound-session-credentials.session_manager')
# The client will ask the server to set a cookie, because client code can't
# always do so itself (e.g. HttpOnly attribute).
def main(request, response):
request_body = request.body.decode('utf-8')
return (200, [("Set-Cookie", request_body)], "")