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