GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — wsgiref doesn't appear to ever set REMOTE_HOST in the environ · Issue #66425 · python/cpython

wsgiref doesn't appear to ever set REMOTE_HOST in the environ #66425

New issue
Copy link
New issue
Copy link
Closed
Closed
wsgiref doesn't appear to ever set REMOTE_HOST in the environ#66425
Copy link
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@alex
alex
opened on Aug 19, 2014
Issue body actions
BPO 22229
Nosy @pjeby, @alex, @berkerpeksag, @isidentical

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 = None
closed_at = None
created_at = <Date 2014-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 = <Date 2019-11-18.22:03:20.358>
user = 'https://github.com/alex'

bugs.python.org fields:

activity = <Date 2019-11-18.22:03:20.358>
actor = 'BTaskaya'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = ['Library (Lib)']
creation = <Date 2014-08-19.17:34:05.563>
creator = 'alex'
dependencies = []
files = []
hgrepos = []
issue_num = 22229
keywords = []
message_count = 2.0
messages = ['225534', '356918']
nosy_count = 4.0
nosy_names = ['pje', 'alex', 'berker.peksag', 'BTaskaya']
pr_nums = []
priority = 'normal'
resolution = None
stage = 'needs patch'
status = 'open'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue22229'
versions = ['Python 3.4', 'Python 3.5']

Linked PRs

  • gh-66425: Remove the unreachable code to set REMOTE_HOST header #111441

Activity

  1. alex commented on Aug 19, 2014

    @alex
    alex
    on Aug 19, 2014
    MemberAuthor
    More actions

    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.

  2. alex
    added
    stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directory
    on Aug 19, 2014
  3. berkerpeksag
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on Aug 20, 2014
  4. isidentical commented on Nov 18, 2019

    @isidentical
    isidentical
    on Nov 18, 2019
    SponsorMember
    More actions

    I didn't understand the issue. WSGIRequestHandler can be subclassed and address_string method may return something else.

  5. ezio-melotti
    transferred this issue fromon Apr 10, 2022
  6. c-bata
    added a commit that references this issue on Oct 29, 2023

    pythongh-66425: Remove the unreachable code to set REMOTE_HOST header…

    9c12d65
  7. corona10
    added a commit that references this issue on Oct 29, 2023

    gh-66425: Remove the unreachable code to set `REMOTE_HOST` header (gh…

    8c47ada
  8. corona10 commented on Oct 29, 2023

    @corona10
    corona10
    on Oct 29, 2023
    Member
    More actions

    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

  9. corona10
    closed this as completedon Oct 29, 2023
  10. iritkatriel
    added a commit that references this issue on Oct 29, 2023

    pythongh-66425: Remove the unreachable code to set `REMOTE_HOST` head…

    31a9dcf
  11. FullteaR
    added a commit that references this issue on Nov 3, 2023

    pythongh-66425: Remove the unreachable code to set `REMOTE_HOST` head…

    ab530e0
  12. aisk
    added a commit that references this issue on Feb 11, 2024

    pythongh-66425: Remove the unreachable code to set `REMOTE_HOST` head…

    67439d9
  13. Glyphack
    added a commit that references this issue on Sep 2, 2024

    pythongh-66425: Remove the unreachable code to set `REMOTE_HOST` head…

    6c9ade5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.