blob: 84668e3fd5b0a64372082a791f92f15c266ca73b [file] [log] [blame]
#!/usr/bin/env python3
import os
import sys
from urllib.parse import parse_qs
to = parse_qs(os.environ.get('QUERY_STRING', ''), keep_blank_values=True).get('to', [None])[0]
sys.stdout.write('Content-Type: text/html\r\n\r\n')
if to is not None:
sys.stdout.write('<script>location.href=\'{}\';</script>'.format(to))
sys.stdout.write('<body>Redirecting</body>')