[mod_python] mod_python.publisher weirdness

Jeff Hinrichs jlh at cox.net
Tue Apr 13 22:50:08 EST 2004


mod_python: 3.1.3
OS: FreeBSD 4.9 Stable
Apache: Apache/2.0.49 (Unix) mod_python/3.1.3 Python/2.3.3

httpd.conf:
<Directory "/usr/local/www/data/mrt">
    SetHandler mod_python
    PythonHandler mod_python.publisher
    PythonDebug On
</Directory>
<Directory "/usr/local/www/data/mrtJDB">
    SetHandler mod_python
    PythonHandler mod_python.publisher
    PythonDebug On
</Directory>

I have an index.py in each of the two directories.  On both pages a link to
 http://mysite/mrt/  exists.

Events to recreate:
 http://mysite/mrt/
 click on a form to do a post to http://mysite/mrt/xlogon (a method in
/mrt/index.py)
 Edit the URL in the browser to http://mysite/mrtJDB/
 When that page appears click on the link to http://mysite/mrt/

The page reloads and URL says, http://mysite/mrt/ the apache log agrees,
and no errors reported in the error log. However, the page is still the
http://mysite/mrtJDB/ page. If I click on the link 2 or 3 more times then
I get the http://mysite/mrt/ page.

Now things get really silly, if I continue to click on the href that points
to http://mysite/mrt/ I sometimes get the http://mysite/mrtJDB/ page and now
by clicking on the link repeatedly I haphazardly jump back and forth between
the two pages.  It's as if mod_python.publisher is getting confused.

This same occurence will also play out if the directories are arranged as:
http://mysite/mrt/
http://mysite/mrt/mrtJDB/
and making the necessary changes to the apache conf
httpd.conf:
<Directory "/usr/local/www/data/mrt">
    SetHandler mod_python
    PythonHandler mod_python.publisher
    PythonDebug On
</Directory>
<Directory "/usr/local/www/data/mrt/mrtJDB">
    SetHandler mod_python
    PythonHandler mod_python.publisher
    PythonDebug On
</Directory>
 and restarting apache.

I've tried from Moz 1.7, FireFox 0.8, and IE6
I've dumped caches and turned on forced reloads
I've put pragma no-cache and page expirations in the meta tags
I've tried req.headers_out.add("Cache-Control:","no-cache")
and req.headers_out.add("Pragma:","no-cache")

I'm at a loss and googled myself silly.

I must be doing something very wrong but I'm just not seeing it right now.

help.

Thanks,

Jeff Hinrichs

p.s. "mysite" is just a place holder for the actual webserver name.



More information about the Mod_python mailing list