1
0
mirror of https://github.com/apache/httpd.git synced 2026-10-23 22:49:01 +03:00
Files
apache/test/modules/http2/htdocs/cgi/echohd.py
Stefan Eissing 2430b019cd make the http2 test suite working again
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1909452 13f79535-47bb-0310-9956-ffa450edef68
2023-04-27 11:35:51 +00:00

23 lines
464 B
Python

#!/usr/bin/env python3
import os, sys
from requestparser import get_request_params
forms, files = get_request_params()
name = forms['name'] if 'name' in forms else None
if name:
print("Status: 200")
print("""\
Content-Type: text/plain\n""")
print("""%s: %s""" % (name, os.environ['HTTP_'+name]))
else:
print("Status: 400 Parameter Missing")
print("""\
Content-Type: text/html\n
<html><body>
<p>No name was specified</p>
</body></html>""")