Skip to content

Commit

Permalink
pythongh-66425: Remove the unreachable code to set REMOTE_HOST head…
Browse files Browse the repository at this point in the history
  • Loading branch information
c-bata authored and Glyphack committed Jan 27, 2024
1 parent 70d4a6d commit 6c9ade5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 0 additions & 4 deletions Lib/wsgiref/simple_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,6 @@ def get_environ(self):

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:
Expand Down
Original file line number Diff line number Diff line change
@@ -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.

0 comments on commit 6c9ade5

Please sign in to comment.