|
Dr Robert Sanderson
azaroth at liverpool.ac.uk
Tue Jun 24 18:28:47 EST 2003
When trying to write a trivial connection handler that only works when
accessed from a certain port, I found that trying to
read connection.local_addr results in a seg fault.
I'm running:
Server version: Apache/2.0.40
Server built: May 20 2003 10:15:29
Which is the Redhat 9 current RPM. Mod_Python is 3.0.1, also the current
Redhat RPM.
My server config addition looks like:
Listen 2100
PythonPath "sys.path+['/home/cheshire/']"
PythonConnectionHandler ztest
PythonDebug On
And then /home/cheshire/ztest.py reads:
-------------
from mod_python import apache
def connectionhandler(conn):
conn.write("Trying to do something ...")
try:
conn.write(repr(conn.local_addr))
except Exception, err:
conn.write("Broke")
conn.write("Done it.")
return apache.OK
-------------
[cheshire at mithlond cheshire]$ telnet localhost 2100
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Trying to do something ...Connection closed by foreign host.
[Tue Jun 24 18:14:39 2003] [notice] mod_python: (Re)importing module 'ztest'
[Tue Jun 24 18:14:40 2003] [notice] child pid 2193 exit signal Segmentation
fault (11)
Any ideas? Has this been fixed in a more recent version, and I should get
stuck in and recompile everything from source?
Rob
--
,'/:. Rob Sanderson (azaroth at liverpool.ac.uk)
,'-/::::. http://www.o-r-g.org/~azaroth/
,'--/::(@)::. Special Collections and Archives, extension 3142
,'---/::::::::::. Nebmedes: telnet: nebmedes.o-r-g.org 7777
____/:::::::::::::. WWW: http://nebmedes.o-r-g.org:8000/
I L L U M I N A T I
|