Skip to content

Commit 67439d9

Browse files
c-bataaisk
authored andcommitted
pythongh-66425: Remove the unreachable code to set REMOTE_HOST header (pythongh-111441)
1 parent c1425bf commit 67439d9

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

Lib/wsgiref/simple_server.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,6 @@ def get_environ(self):
8484

8585
env['PATH_INFO'] = urllib.parse.unquote(path, 'iso-8859-1')
8686
env['QUERY_STRING'] = query
87-
88-
host = self.address_string()
89-
if host != self.client_address[0]:
90-
env['REMOTE_HOST'] = host
9187
env['REMOTE_ADDR'] = self.client_address[0]
9288

9389
if self.headers.get('content-type') is None:
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Remove the code to set the REMOTE_HOST header from wsgiref module,
2+
as it is unreachable. This header is used for performance reasons,
3+
which is not necessary in the wsgiref module.

0 commit comments

Comments
 (0)