Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=Nonecreated_at=<Date2014-08-19.17:34:05.563>labels= ['type-bug', 'library']
title="wsgiref doesn't appear to ever set REMOTE_HOST in the environ"updated_at=<Date2019-11-18.22:03:20.358>user='https://github.com/alex'
Activity
alex commented on Aug 19, 2014
Based on a reading of the code:
https://github.com/python/cpython/blob/master/Lib/wsgiref/simple_server.py#L88-L90
is where REMOTE_HOST is set.
However, address_string always returns self.client_address[0] (https://github.com/python/cpython/blob/master/Lib/http/server.py#L568), which means that != comparison always returns False, which means REMOTE_HOST is never actually set correctly.
isidentical commented on Nov 18, 2019
I didn't understand the issue. WSGIRequestHandler can be subclassed and address_string method may return something else.
pythongh-66425: Remove the unreachable code to set REMOTE_HOST header…
gh-66425: Remove the unreachable code to set `REMOTE_HOST` header (gh…
corona10 commented on Oct 29, 2023
Merge the PR, Even if someone overrides WSGIRequestHandler there is the documentation that the user should care about: https://docs.python.org/3/library/wsgiref.html?highlight=wsgirequesthandler#wsgiref.simple_server.WSGIRequestHandler
pythongh-66425: Remove the unreachable code to set `REMOTE_HOST` head…
pythongh-66425: Remove the unreachable code to set `REMOTE_HOST` head…
pythongh-66425: Remove the unreachable code to set `REMOTE_HOST` head…
pythongh-66425: Remove the unreachable code to set `REMOTE_HOST` head…