httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Raymond S Brand <>
Subject Re: cvs commit: apache-1.3/src/modules/standard mod_autoindex.c mod_include.c
Date Thu, 13 May 1999 19:14:43 GMT
Dean Gaudet wrote:
> On 13 May 1999 wrote:
> >   Index: mod_include.c
> I never had a chance to look at Raymond's hacks to mod_include.
> >   +#define SUB_REQ_STRING     "Sub request to mod_include"
> >   +#define PARENT_STRING      "Parent request to mod_include"
> I don't like these #defines spread over two modules.  I don't like modules
> which rely on each other.

They don't rely on each other, they build on each other. And they both
work if the other isn't loaded. Which header file do you suggest for
the defines?

> >   @@ -2411,9 +2441,10 @@
> >        send_parsed_content(f, r);
> >
> >        if (parent) {
> >   -   /* signify that the sub request should not be killed */
> >   -   ap_set_module_config(r->request_config, &includes_module,
> >   -       NESTED_INCLUDE_MAGIC);
> >   +   /* Kludge --- Doing this allows the caller to safely destroy the
> >   +    * sub_req
> >   +    */
> >   +   r->pool = ap_make_sub_pool(r->pool);
> I haven't looked at this for long, but I believe this is totally wrong.

As far as I can tell it's perfectly safe. The original pool that the sub_req
is in has been ap_pool_join()ed to the parent_req pool; it is also a sub pool
of the parent pool. The making of the (empty) sub pool here is, as the comment
says, to allow the sub_req to safely destroyed. The code that destroys reqs
does no other work than to call ap_destroy_pool() so this should be safe.

> Try building with -DPOOL_DEBUG -DALLOC_DEBUG and see what happens.

-DPOOL_DEBUG=1 is what I used to come up with this scheme.

> I would much rather have Raymod's updates to mod_autoindex separate from
> the hacks to mod_include... when I asked for him to post his patches again
> "combined" I meant:  post the patches with the style changes... I didn't
> mean combine the "evil hack" and the acceptable patch.  I just didn't
> want to review a patch on top of a patch.

I can generate another patch that implements the rendezvous but the
smaller of the two patches attached to my 5/4/99 message is still good.
The handful lines added to mod_autoindex will have to be applied by hand;
though, due to the changes Ken and I made. The "Evil Hack" is long dead.

Raymond S Brand

View raw message