Show More
@@ -13,6 +13,7 b' import os' | |||
|
13 | 13 | import socket |
|
14 | 14 | import sys |
|
15 | 15 | import traceback |
|
16 | import wsgiref.validate | |
|
16 | 17 | |
|
17 | 18 | from ..i18n import _ |
|
18 | 19 | |
@@ -128,8 +129,7 b' class _httprequesthandler(httpservermod.' | |||
|
128 | 129 | env[r'PATH_INFO'] = pycompat.sysstr(path[len(self.server.prefix):]) |
|
129 | 130 | env[r'REMOTE_HOST'] = self.client_address[0] |
|
130 | 131 | env[r'REMOTE_ADDR'] = self.client_address[0] |
|
131 | if query: | |
|
132 | env[r'QUERY_STRING'] = query | |
|
132 | env[r'QUERY_STRING'] = query or r'' | |
|
133 | 133 | |
|
134 | 134 | if pycompat.ispy3: |
|
135 | 135 | if self.headers.get_content_type() is None: |
@@ -166,6 +166,8 b' class _httprequesthandler(httpservermod.' | |||
|
166 | 166 | socketserver.ForkingMixIn) |
|
167 | 167 | env[r'wsgi.run_once'] = 0 |
|
168 | 168 | |
|
169 | wsgiref.validate.check_environ(env) | |
|
170 | ||
|
169 | 171 | self.saved_status = None |
|
170 | 172 | self.saved_headers = [] |
|
171 | 173 | self.length = None |
General Comments 0
You need to be logged in to leave comments.
Login now