summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/fetch/api/resources/stash-take.py
blob: e6db80dd86df1e5a80e177b78bd40a59234885b0 (plain)
1
2
3
4
5
6
7
8
9
from wptserve.handlers import json_handler


@json_handler
def main(request, response):
    dir = u'/'.join(request.url_parts.path.split(u'/')[:-1]) + u'/'
    key = request.GET.first(b"key")
    response.headers.set(b'Access-Control-Allow-Origin', b'*')
    return request.server.stash.take(key, dir)