quetz-mod_python-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Glover <m...@janrain.com>
Subject Re: Bizarre behavior with util.redirect() and mod_autoindex
Date Thu, 14 Sep 2006 22:48:59 GMT
Graham-

Thanks for the reply.

I have DirectoryIndex inherited from httpd.conf.

The handler is a PythonHandler.

Read the link you sent later -- I'm not clueful enough yet to know if that's biting me (it
seems to only apply to the earlier handlers, no?) -- but yes,  we are running 3.2.10.

-mike

On Thu, 14 Sep 2006 18:05:56 -0400
"Graham Dumpleton" <grahamd@dscpl.com.au> wrote:

> Do you have the DirectoryIndex directive defined explicitly or inherited
> from outer scope? What handler phase are you defining your mod_python
> handler in?
> 
> Graham
> 
> 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
> 
> 

Mime
View raw message