[mod_python] Questions on path_info and PSP

Andrew Barilla drew at exit66.com
Tue May 4 15:03:39 EST 2004

I was fiddiling with this and figured I could just create my own hander,
however not all of the path_info is being passed.  For example:


Calls my handler but when I do the following:


Only the /parameters/and/stuff is passed as path_info.  Is there an easy way
to get the '/some' part as well without breaking apart the req.uri or
req.filename values?


On Tue, 4 May 2004 11:53:50 -0400, Andrew Barilla wrote
> I set up mod_python 3.1 up with the following configuration:
> <Directory /home/httpd/html/test>
>     SetHandler mod_python
>     PythonHandler mod_python.publisher
>     PythonDebug on
> </Directory>
> I have mptest.py in the test directory with an index function and a test
> function so both http://localhost/test/mptest and
> http://localhost/test/mptest/test work.  But,
> http://localhost/test/mptest/test/whatever does not.  Is it possible 
> to set things up so the test function is called and I can get the 
> 'whatever' part from req.path_info?
> On another note and I'm sure there is a simple answer to this that 
> I'm overlooking, but I did the example of using PSP files as 
> templates from this article
> (http://www.onlamp.com/pub/a/python/2004/02/26/python_server_pages.html) but
it's returning the html page as text.  i.e. I see
> <html>
>   <h1>Hello</h1>
> </html>
> in the browser.  Do I need to set the content type somewhere or something?
> Thanks,
> Andy
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python

More information about the Mod_python mailing list