summaryrefslogtreecommitdiff
path: root/test/modules/http2/htdocs/cgi/mnot164.py
blob: 0e5d1072464008e5750ed39098bd0537702bc036 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env python3

import cgi
import cgitb; cgitb.enable()
import os
import sys

try:
    form = cgi.FieldStorage()
    count = form['count'].value
    text = form['text'].value
except KeyError:
    text="a"
    count=77784

count = int(count)

print("Status: 200 OK")
print("Content-Type: text/html")
print()
sys.stdout.flush()
for _ in range(count):
    sys.stdout.write(text)