Skip to content

Commit 8c47ada

Browse files
authored
gh-66425: Remove the unreachable code to set REMOTE_HOST header (gh-111441)
1 parent 66bea25 commit 8c47ada

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

Lib/wsgiref/simple_server.py

-4
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:
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)