You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mod_python-dev@quetz.apache.org by "Graham Dumpleton (JIRA)" <ji...@apache.org> on 2006/02/04 23:54:03 UTC
[jira] Created: (MODPYTHON-120) Connection handler test fails on
virtual hosting system such as OpenVPS.
Connection handler test fails on virtual hosting system such as OpenVPS.
------------------------------------------------------------------------
Key: MODPYTHON-120
URL: http://issues.apache.org/jira/browse/MODPYTHON-120
Project: mod_python
Type: Bug
Components: core
Versions: 3.2
Reporter: Graham Dumpleton
Priority: Minor
On a virtual hosting environment such as OpenVPS, "localhost" does not map to the IP address "127.0.0.1" but the actual IP of the host.
>>> import socket
>>> socket.gethostbyname("localhost")
'207.126.122.36'
This fact causes the connection handler test to fail because it sets up the virtual host listener definition as something like:
Listen 59180
<VirtualHost 127.0.0.1:59180>
SetHandler mod_python
PythonPath [r'/home/grahamd/mod_python-3.2.7/test/htdocs']+sys.path
PythonConnectionHandler tests::connectionhandler
</VirtualHost>
In this case it really needs to be:
Listen 59180
<VirtualHost 207.126.122.36:59180>
SetHandler mod_python
PythonPath [r'/home/grahamd/mod_python-3.2.7/test/htdocs']+sys.path
PythonConnectionHandler tests::connectionhandler
</VirtualHost>
To accomodate virtual hosting arrangements, the test might be able to be rewritten as:
def test_connectionhandler_conf(self):
try:
ip = socket.gethostbyname("localhost")
except:
ip = "127.0.0.1"
self.conport = findUnusedPort()
c = str(Listen("%d" % self.conport)) + \
str(VirtualHost("%s:%d" % (ip,self.conport),
SetHandler("mod_python"),
PythonPath("[r'%s']+sys.path" % DOCUMENT_ROOT),
PythonConnectionHandler("tests::connectionhandler")))
return c
This should always work on UNIX boxes, but whether it does on Win32 boxes would need to be confirmed.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
Re: [jira] Created: (MODPYTHON-120) Connection handler test fails
on virtual hosting system such as OpenVPS.
Posted by Jorey Bump <li...@joreybump.com>.
Graham Dumpleton (JIRA) wrote:
> On a virtual hosting environment such as OpenVPS, "localhost" does not map to the IP address "127.0.0.1" but the actual IP of the host.
>
> >>> import socket
> >>> socket.gethostbyname("localhost")
> '207.126.122.36'
>
> This fact causes the connection handler test to fail because it sets up the virtual host listener definition as something like:
>
> Listen 59180
> <VirtualHost 127.0.0.1:59180>
> SetHandler mod_python
> PythonPath [r'/home/grahamd/mod_python-3.2.7/test/htdocs']+sys.path
> PythonConnectionHandler tests::connectionhandler
> </VirtualHost>
>
> In this case it really needs to be:
>
> Listen 59180
> <VirtualHost 207.126.122.36:59180>
> SetHandler mod_python
> PythonPath [r'/home/grahamd/mod_python-3.2.7/test/htdocs']+sys.path
> PythonConnectionHandler tests::connectionhandler
> </VirtualHost>
I'd never do it in production, but, for testing purposes, wouldn't it be
easier to use localhost directly?
Listen 59180
<VirtualHost localhost:59180>
SetHandler mod_python
PythonPath [r'/home/grahamd/mod_python-3.2.7/test/htdocs']+sys.path
PythonConnectionHandler tests::connectionhandler
</VirtualHost>
This should be portable across platforms.
[jira] Assigned: (MODPYTHON-120) Connection handler test fails on
virtual hosting system such as OpenVPS.
Posted by "Graham Dumpleton (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/MODPYTHON-120?page=all ]
Graham Dumpleton reassigned MODPYTHON-120:
------------------------------------------
Assign To: Graham Dumpleton
> Connection handler test fails on virtual hosting system such as OpenVPS.
> ------------------------------------------------------------------------
>
> Key: MODPYTHON-120
> URL: http://issues.apache.org/jira/browse/MODPYTHON-120
> Project: mod_python
> Type: Bug
> Components: core
> Versions: 3.2.7
> Reporter: Graham Dumpleton
> Assignee: Graham Dumpleton
> Priority: Minor
>
> On a virtual hosting environment such as OpenVPS, "localhost" does not map to the IP address "127.0.0.1" but the actual IP of the host.
> >>> import socket
> >>> socket.gethostbyname("localhost")
> '207.126.122.36'
> This fact causes the connection handler test to fail because it sets up the virtual host listener definition as something like:
> Listen 59180
> <VirtualHost 127.0.0.1:59180>
> SetHandler mod_python
> PythonPath [r'/home/grahamd/mod_python-3.2.7/test/htdocs']+sys.path
> PythonConnectionHandler tests::connectionhandler
> </VirtualHost>
> In this case it really needs to be:
> Listen 59180
> <VirtualHost 207.126.122.36:59180>
> SetHandler mod_python
> PythonPath [r'/home/grahamd/mod_python-3.2.7/test/htdocs']+sys.path
> PythonConnectionHandler tests::connectionhandler
> </VirtualHost>
> To accomodate virtual hosting arrangements, the test might be able to be rewritten as:
> def test_connectionhandler_conf(self):
> try:
> ip = socket.gethostbyname("localhost")
> except:
> ip = "127.0.0.1"
> self.conport = findUnusedPort()
> c = str(Listen("%d" % self.conport)) + \
> str(VirtualHost("%s:%d" % (ip,self.conport),
> SetHandler("mod_python"),
> PythonPath("[r'%s']+sys.path" % DOCUMENT_ROOT),
> PythonConnectionHandler("tests::connectionhandler")))
> return c
> This should always work on UNIX boxes, but whether it does on Win32 boxes would need to be confirmed.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Closed: (MODPYTHON-120) Connection handler test fails on
virtual hosting system such as OpenVPS.
Posted by "Graham Dumpleton (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MODPYTHON-120?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Graham Dumpleton closed MODPYTHON-120.
--------------------------------------
> Connection handler test fails on virtual hosting system such as OpenVPS.
> ------------------------------------------------------------------------
>
> Key: MODPYTHON-120
> URL: https://issues.apache.org/jira/browse/MODPYTHON-120
> Project: mod_python
> Issue Type: Bug
> Components: core
> Affects Versions: 3.2.7
> Reporter: Graham Dumpleton
> Assigned To: Graham Dumpleton
> Priority: Minor
> Fix For: 3.3
>
>
> On a virtual hosting environment such as OpenVPS, "localhost" does not map to the IP address "127.0.0.1" but the actual IP of the host.
> >>> import socket
> >>> socket.gethostbyname("localhost")
> '207.126.122.36'
> This fact causes the connection handler test to fail because it sets up the virtual host listener definition as something like:
> Listen 59180
> <VirtualHost 127.0.0.1:59180>
> SetHandler mod_python
> PythonPath [r'/home/grahamd/mod_python-3.2.7/test/htdocs']+sys.path
> PythonConnectionHandler tests::connectionhandler
> </VirtualHost>
> In this case it really needs to be:
> Listen 59180
> <VirtualHost 207.126.122.36:59180>
> SetHandler mod_python
> PythonPath [r'/home/grahamd/mod_python-3.2.7/test/htdocs']+sys.path
> PythonConnectionHandler tests::connectionhandler
> </VirtualHost>
> To accomodate virtual hosting arrangements, the test might be able to be rewritten as:
> def test_connectionhandler_conf(self):
> try:
> ip = socket.gethostbyname("localhost")
> except:
> ip = "127.0.0.1"
> self.conport = findUnusedPort()
> c = str(Listen("%d" % self.conport)) + \
> str(VirtualHost("%s:%d" % (ip,self.conport),
> SetHandler("mod_python"),
> PythonPath("[r'%s']+sys.path" % DOCUMENT_ROOT),
> PythonConnectionHandler("tests::connectionhandler")))
> return c
> This should always work on UNIX boxes, but whether it does on Win32 boxes would need to be confirmed.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Work started: (MODPYTHON-120) Connection handler test fails
on virtual hosting system such as OpenVPS.
Posted by "Graham Dumpleton (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/MODPYTHON-120?page=all ]
Work on MODPYTHON-120 started by Graham Dumpleton
> Connection handler test fails on virtual hosting system such as OpenVPS.
> ------------------------------------------------------------------------
>
> Key: MODPYTHON-120
> URL: http://issues.apache.org/jira/browse/MODPYTHON-120
> Project: mod_python
> Type: Bug
> Components: core
> Versions: 3.2.7
> Reporter: Graham Dumpleton
> Assignee: Graham Dumpleton
> Priority: Minor
>
> On a virtual hosting environment such as OpenVPS, "localhost" does not map to the IP address "127.0.0.1" but the actual IP of the host.
> >>> import socket
> >>> socket.gethostbyname("localhost")
> '207.126.122.36'
> This fact causes the connection handler test to fail because it sets up the virtual host listener definition as something like:
> Listen 59180
> <VirtualHost 127.0.0.1:59180>
> SetHandler mod_python
> PythonPath [r'/home/grahamd/mod_python-3.2.7/test/htdocs']+sys.path
> PythonConnectionHandler tests::connectionhandler
> </VirtualHost>
> In this case it really needs to be:
> Listen 59180
> <VirtualHost 207.126.122.36:59180>
> SetHandler mod_python
> PythonPath [r'/home/grahamd/mod_python-3.2.7/test/htdocs']+sys.path
> PythonConnectionHandler tests::connectionhandler
> </VirtualHost>
> To accomodate virtual hosting arrangements, the test might be able to be rewritten as:
> def test_connectionhandler_conf(self):
> try:
> ip = socket.gethostbyname("localhost")
> except:
> ip = "127.0.0.1"
> self.conport = findUnusedPort()
> c = str(Listen("%d" % self.conport)) + \
> str(VirtualHost("%s:%d" % (ip,self.conport),
> SetHandler("mod_python"),
> PythonPath("[r'%s']+sys.path" % DOCUMENT_ROOT),
> PythonConnectionHandler("tests::connectionhandler")))
> return c
> This should always work on UNIX boxes, but whether it does on Win32 boxes would need to be confirmed.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Resolved: (MODPYTHON-120) Connection handler test fails on
virtual hosting system such as OpenVPS.
Posted by "Graham Dumpleton (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/MODPYTHON-120?page=all ]
Graham Dumpleton resolved MODPYTHON-120:
----------------------------------------
Fix Version: 3.3
Resolution: Fixed
> Connection handler test fails on virtual hosting system such as OpenVPS.
> ------------------------------------------------------------------------
>
> Key: MODPYTHON-120
> URL: http://issues.apache.org/jira/browse/MODPYTHON-120
> Project: mod_python
> Type: Bug
> Components: core
> Versions: 3.2.7
> Reporter: Graham Dumpleton
> Assignee: Graham Dumpleton
> Priority: Minor
> Fix For: 3.3
>
> On a virtual hosting environment such as OpenVPS, "localhost" does not map to the IP address "127.0.0.1" but the actual IP of the host.
> >>> import socket
> >>> socket.gethostbyname("localhost")
> '207.126.122.36'
> This fact causes the connection handler test to fail because it sets up the virtual host listener definition as something like:
> Listen 59180
> <VirtualHost 127.0.0.1:59180>
> SetHandler mod_python
> PythonPath [r'/home/grahamd/mod_python-3.2.7/test/htdocs']+sys.path
> PythonConnectionHandler tests::connectionhandler
> </VirtualHost>
> In this case it really needs to be:
> Listen 59180
> <VirtualHost 207.126.122.36:59180>
> SetHandler mod_python
> PythonPath [r'/home/grahamd/mod_python-3.2.7/test/htdocs']+sys.path
> PythonConnectionHandler tests::connectionhandler
> </VirtualHost>
> To accomodate virtual hosting arrangements, the test might be able to be rewritten as:
> def test_connectionhandler_conf(self):
> try:
> ip = socket.gethostbyname("localhost")
> except:
> ip = "127.0.0.1"
> self.conport = findUnusedPort()
> c = str(Listen("%d" % self.conport)) + \
> str(VirtualHost("%s:%d" % (ip,self.conport),
> SetHandler("mod_python"),
> PythonPath("[r'%s']+sys.path" % DOCUMENT_ROOT),
> PythonConnectionHandler("tests::connectionhandler")))
> return c
> This should always work on UNIX boxes, but whether it does on Win32 boxes would need to be confirmed.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira