C
charlie knudsen
I am setting up mod_python 2.7.10 on Apache 1.3.33 as a dso and was
wondering if there is a default function that is called when the publisher
handler is not given a function. I have read through some documentation
and it looks like mod_python 3.x defaults to the index function, but that
does not appear to work for 2.7. Also I am using python 2.3.4.
I have the following file as index.py in the test directory of my web root:
from mod_python import apache
def index(req):
return "hello world"
Currently I get the following behavior:
http://localhost/test/index.py - 404 error
http://localhost/test/index.py/index - my "hello world" output
http://localhost/test/index.py/ - I get :
----------------------
Mod_python error: "PythonHandler mod_python.publisher"
Traceback (most recent call last):
File "/usr/lib/python2.3/site-packages/mod_python/apache.py", line 193, in
Dispatch
result = object(req)
File "/usr/lib/python2.3/site-packages/mod_python/publisher.py", line 88,
in handler
if func_path[-1] == ".":
IndexError: string index out of range
----------------------
I was wondering if there was a default function in mod_python 2.7.10.
If not, is there any reasons why I should not add one? Other than the fact
that the current implementation is well tested.
Thank you,
Charlie
wondering if there is a default function that is called when the publisher
handler is not given a function. I have read through some documentation
and it looks like mod_python 3.x defaults to the index function, but that
does not appear to work for 2.7. Also I am using python 2.3.4.
I have the following file as index.py in the test directory of my web root:
from mod_python import apache
def index(req):
return "hello world"
Currently I get the following behavior:
http://localhost/test/index.py - 404 error
http://localhost/test/index.py/index - my "hello world" output
http://localhost/test/index.py/ - I get :
----------------------
Mod_python error: "PythonHandler mod_python.publisher"
Traceback (most recent call last):
File "/usr/lib/python2.3/site-packages/mod_python/apache.py", line 193, in
Dispatch
result = object(req)
File "/usr/lib/python2.3/site-packages/mod_python/publisher.py", line 88,
in handler
if func_path[-1] == ".":
IndexError: string index out of range
----------------------
I was wondering if there was a default function in mod_python 2.7.10.
If not, is there any reasons why I should not add one? Other than the fact
that the current implementation is well tested.
Thank you,
Charlie