mod_python's request.META["SERVER_PORT"] is always set to 0
|Reported by:||anonymous||Owned by:||adrian|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Description (last modified by adrian)
I have found small bug in core/handlers/modpython.py.
Namely, request.META["SERVER_PORT"] under mod_python is always set to 0.
This is because it's set to self._req.server.port in modpython.py, on line 88.
mod_python's docs say --
port Integer. TCP/IP port number. Same as CGI SERVER_PORT. This member appears to be 0 on Apache 2.0, look at req.connection.local_addr instead (Read-Only)
So I think it should be:
Because self._req.connection.local_addr is an integer, I think it should be string as other headers are.
Change History (13)
comment:4 Changed 5 years ago by walter.stafford@…
- Resolution fixed deleted
- Status changed from closed to reopened
comment:12 Changed 5 years ago by mtredinnick
- Resolution set to fixed
- Status changed from reopened to closed