quetz-mod_python-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Graham Dumpleton" <grah...@dscpl.com.au>
Subject Re: Bizarre behavior with util.redirect() and mod_autoindex
Date Thu, 14 Sep 2006 22:05:56 GMT
Do you have the DirectoryIndex directive defined explicitly or inherited
from outer scope? What handler phase are you defining your mod_python
handler in?


Mike Glover wrote ..
> I'm working on an OpenID access control using mod_python.  As part of the
> OpenID protocol, our code redirects (302) attempted access to a login page.
> Works Great.
> However.  If I try to use mod_autoindex to view a directory, and some of
> the files in that directory have OpenID access control enabled, I get a
> page that looks like the attached image.
> What's Happening?  mod_autoindex is spawning an internal subrequest for
> each file in the directory.  For the access controlled files, util.redirect()
> is being called as part of that subrequest.  util.redirect() automatically
> outputs the 'the document has moved here' language directly to the client.
> I solved this in our app by not generating the 302 if req.main != None.
> I don't think I should have to worry about that (though I'm willing to
> be convinced).  util.redirect() should recognize the internal request and
> not write output to the client.
> I'll happily submit a patch against util.py if folks here think it helpful.
> -mike
> -mike

View raw message