summaryrefslogtreecommitdiff
path: root/test/modules/http2/htdocs/cgi/echo.py
blob: 58d811c42d4ea3da8842fec4a2d6217ff5dace0d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/env python3
import sys, cgi, os

status = '200 Ok'

content = ''
for line in sys.stdin:
    content += line
    
# Just echo what we get
print("Status: 200")
print(f"Request-Length: {len(content)}")
print("Content-Type: application/data\n")
sys.stdout.write(content)