summaryrefslogtreecommitdiffstats
path: root/test/modules/http2/htdocs/cgi/env.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 23:56:20 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 23:56:20 +0000
commit3161ed034bbea40a705303811d7213aff9be17d2 (patch)
tree4ccc5d590ecdf3a47867c6fc2433ef757c7c3363 /test/modules/http2/htdocs/cgi/env.py
parentReleasing progress-linux version 2.4.56-1~deb11u2progress6u1. (diff)
downloadapache2-3161ed034bbea40a705303811d7213aff9be17d2.tar.xz
apache2-3161ed034bbea40a705303811d7213aff9be17d2.zip
Merging upstream version 2.4.59.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--test/modules/http2/htdocs/cgi/env.py17
1 files changed, 1 insertions, 16 deletions
diff --git a/test/modules/http2/htdocs/cgi/env.py b/test/modules/http2/htdocs/cgi/env.py
index 3af5764..455c623 100644
--- a/test/modules/http2/htdocs/cgi/env.py
+++ b/test/modules/http2/htdocs/cgi/env.py
@@ -1,21 +1,6 @@
#!/usr/bin/env python3
import os, sys
-import multipart
-from urllib import parse
-
-
-def get_request_params():
- oforms = {}
- if "REQUEST_URI" in os.environ:
- qforms = parse.parse_qs(parse.urlsplit(os.environ["REQUEST_URI"]).query)
- for name, values in qforms.items():
- oforms[name] = values[0]
- myenv = os.environ.copy()
- myenv['wsgi.input'] = sys.stdin.buffer
- mforms, ofiles = multipart.parse_form_data(environ=myenv)
- for name, item in mforms.items():
- oforms[name] = item
- return oforms, ofiles
+from requestparser import get_request_params
forms, files = get_request_params()