trisquel-icecat/icecat/testing/web-platform/tests/partitioned-popins/resources/partitioned-popins.request-header.initial.py
2025-10-06 02:35:48 -06:00

10 lines
No EOL
591 B
Python

from cookies.resources.helpers import setNoCacheAndCORSHeaders
def main(request, response):
# Step 3 (partitioned-popins/partitioned-popins.request-header.tentative.https.window.js)
message = b"Initial("
message += request.headers.get(b"Sec-Popin-Context", b"missing")
message += b")-"
headers = setNoCacheAndCORSHeaders(request, response)
headers.append((b'Location', b"/partitioned-popins/resources/partitioned-popins.request-header.http.py?message=" + message))
headers.append((b'Popin-Policy', b"partitioned=*"))
return 302, headers, b'{"redirect": true}'