quetz-mod_python-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gregory (Grisha) Trubetskoy" <gri...@apache.org>
Subject Re: cvs commit: httpd-python/src mod_python.c
Date Wed, 22 Oct 2003 20:41:17 GMT

On Wed, 22 Oct 2003, Greg Stein wrote:

> On Wed, Oct 22, 2003 at 07:57:04PM -0000, grisha@apache.org wrote:
> >...
> >   +++ mod_python.c	22 Oct 2003 19:57:04 -0000	1.107
> >   @@ -1035,6 +1035,12 @@
> >
> >        if (! (hle || dynhle)) {
> >            /* nothing to do here */
> >   +
> >   +        if (req->finfo.filetype == APR_DIR) {
> >   +            /* this will kick in mod_dir */
> >   +            req->handler = DIR_MAGIC_TYPE;
> >   +        }
>
> Are you sure that it is a good idea to force the handler like this? It
> seems rather extreme, and might actually lock out other types of
> interactions.

If it got this far in the code, then the handler already was "mod_python"
(or "python-program").

Proir to this patch you'd get "not found" when using SetHandler and
looking at a directory, because mod_dir refuses to act when the handler is
not null and not DIR_MAGIC_TYPE. Now you would get "index.html" or
whatever DirectoryIndex is set to.

> Note that I'm not entirely sure of the context, so this is really a
> fly-ball question here. But setting the handler raises a yellow flag to
> me.

Yes, seems a bit awkward to me too - but I can't think anything better,
and AFAICT this causes no harm.

Grisha

Mime
View raw message