summaryrefslogtreecommitdiffstats
path: root/test/wpt/tests/fetch/metadata/resources/header-link.py
blob: de891163a33b17d1204a04db3c10c051341a39c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
def main(request, response):
    """
    Respond with a blank HTML document and a `Link` header which describes
    a link relation specified by the requests `location` and `rel` query string
    parameters
    """
    headers = [
        (b'Content-Type', b'text/html'),
        (
          b'Link',
          b'<' + request.GET.first(b'location') + b'>; rel=' + request.GET.first(b'rel')
        )
    ]
    return (200, headers, b'')