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