Changes between Initial Version and Version 1 of Ticket #2782


Ignore:
Timestamp:
Sep 26, 2006, 10:48:20 AM (18 years ago)
Author:
Adrian Holovaty
Comment:

Fixed formatting of description.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #2782 – Description

    initial v1  
    1 Seems I have found small bug in core/handlers/modpython.py.
     1I have found small bug in core/handlers/modpython.py.
    22
    3 Namely request.META [ "SERVER_PORT" ] under mod_python is always set to 0.
     3Namely, {{{request.META["SERVER_PORT"]}}} under mod_python is always set to 0.
    44
    5 This is because its set to self._req.server.port in modpython.py line
    6 88.
     5This is because it's set to {{{self._req.server.port}}} in modpython.py, on line 88.
    76
    8 mod_python's docs say
    9 (http://www.modpython.org/live/current/doc-html/pyapi-mpsrv-mem.html#l...
     7mod_python's [http://www.modpython.org/live/current/doc-html/pyapi-mpsrv-mem.html#l docs say] --
    108
     9{{{
    1110port
    1211    Integer. TCP/IP port number. Same as CGI SERVER_PORT. This member
    1312appears to be 0 on Apache 2.0, look at req.connection.local_addr
    14 instead (Read-Only
     13instead (Read-Only)
     14}}}
    1515
    1616So I think it should be:
    17 'SERVER_PORT':       str(self._req.connection.local_addr [ 1 ]),
     17{{{
     18'SERVER_PORT': str(self._req.connection.local_addr[1]),
     19}}}
    1820
    19 Because self._req.connection.local_addr [ 1 ] is an integer I think it
    20 should be string as other headers are.
     21Because {{{self._req.connection.local_addr[1]}}} is an integer, I think it should be string as other headers are.
Back to Top