summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/infrastructure/urls/resolving-urls/query-encoding/resources/page-using-manifest.py
blob: 401d741a4bc65960f32a471a85c7e2a34c27f944 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
def main(request, response):
    id = request.GET['id']
    encoding = request.GET['encoding']
    mode = request.GET['mode']
    iframe = ""
    if mode == 'NETWORK':
        iframe = "<iframe src='stash.py?q=%%C3%%A5&id=%s&action=put'></iframe>" % id
    doc = """<!doctype html>
<html manifest="manifest.py?id=%s&encoding=%s&mode=%s">
%s
""" % (id, encoding, mode, iframe)
    return [("Content-Type", "text/html; charset=%s" % encoding)], doc.encode(encoding)