summaryrefslogtreecommitdiffstats
path: root/test/modules/http2/htdocs/cgi/mnot164.py
blob: 43a86ea1094d5ad06caf73d8d321ed6acb104bb3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/env python3
import os, sys
from requestparser import get_request_params


forms, files = get_request_params()
text = forms['text'] if 'text' in forms else "a"
count = int(forms['count']) if 'count' in forms else 77784

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