diff --git a/Lib/wsgiref/simple_server.py b/Lib/wsgiref/simple_server.py index 93d01a863adf59..a0f2397fcf0006 100644 --- a/Lib/wsgiref/simple_server.py +++ b/Lib/wsgiref/simple_server.py @@ -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: diff --git a/Misc/NEWS.d/next/Library/2023-10-29-03-46-27.gh-issue-66425.FWTdDo.rst b/Misc/NEWS.d/next/Library/2023-10-29-03-46-27.gh-issue-66425.FWTdDo.rst new file mode 100644 index 00000000000000..e7ede35891fb33 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2023-10-29-03-46-27.gh-issue-66425.FWTdDo.rst @@ -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.