https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 7cf8b31850c212e68883f583185b9885a31143cc authored by Geoffrey Sneddon on 30 March 2018, 03:09:04 UTC
Test for used column-count when column-count/width are not auto
Tip revision: 7cf8b31
cors-cookie.py

def main(request, response):
    origin = request.GET.first("origin", request.headers["origin"])
    credentials = request.GET.first("credentials", "true")

    headers = [("Content-Type", "text/plain")]
    if origin != 'none':
        headers.append(("Access-Control-Allow-Origin", origin))
    if credentials != 'none':
        headers.append(("Access-Control-Allow-Credentials", credentials))

    ident = request.GET.first('ident', 'test')

    if ident in request.cookies:
        body = request.cookies[ident].value
        response.delete_cookie(ident)
    else:
        response.set_cookie(ident, "COOKIE");
        body = "NO_COOKIE"

    return headers, body
back to top