0
0
mirror of https://github.com/python/cpython.git synced 2024-11-24 00:38:00 +01:00

gh-66425: Remove the unreachable code to set REMOTE_HOST header (gh-111441)

This commit is contained in:
c-bata 2023-10-29 13:56:15 +09:00 committed by GitHub
parent 66bea2555d
commit 8c47ada2de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 4 deletions

View File

@ -84,10 +84,6 @@ class WSGIRequestHandler(BaseHTTPRequestHandler):
env['PATH_INFO'] = urllib.parse.unquote(path, 'iso-8859-1')
env['QUERY_STRING'] = query
host = self.address_string()
if host != self.client_address[0]:
env['REMOTE_HOST'] = host
env['REMOTE_ADDR'] = self.client_address[0]
if self.headers.get('content-type') is None:

View File

@ -0,0 +1,3 @@
Remove the code to set the REMOTE_HOST header from wsgiref module,
as it is unreachable. This header is used for performance reasons,
which is not necessary in the wsgiref module.