httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <dgau...@arctic.org>
Subject Re: [PATCH] (Take 3) Core dump with Language Negotiation?!?
Date Sat, 30 Jan 1999 02:11:15 GMT


On Tue, 19 Jan 1999, Dean Gaudet wrote:

> But I'm questioning what the hell mod_dir is doing this for anyhow.  It
> seems totally bogus.  As equally bogus as the "fast redirect" in
> mod_negotiation -- see lines 2669 and on. 
> 
> Both cases are extremely similar -- we've got a sub_req that we want to
> use to finish the request.  In mod_dir you'll see it uses
> internal_redirect which causes the URI lookup crud to be redone.
> 
> There's got to be a nice simplification of this.  The "fast redirect" 
> code in mod_negotiation was a source of lots of bugs during 1.2.
> 
> I would say the minimum patch we should do now to fix the core dumps is an
> ap_join_pools and remove the ap_destroy_sub_req... similar to what the
> fast redirect does. 

Anyhow, here's the minimum patch I'm suggesting for this for now... unless
someone wants to wrap their head around this subrequest stuff.  I think
the code should probably be the same as the code in mod_negotiation, and
it should all be copied out and put somewhere common.

But there is a corruption possibility, so we should at least patch that
for now. 

Dean

Index: modules/standard/mod_dir.c
===================================================================
RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_dir.c,v
retrieving revision 1.53
diff -u -r1.53 mod_dir.c
--- mod_dir.c	1999/01/01 19:05:08	1.53
+++ mod_dir.c	1999/01/30 02:08:35
@@ -179,13 +179,13 @@
         if (ap_is_HTTP_REDIRECT(rr->status) ||
             (rr->status == HTTP_NOT_ACCEPTABLE && num_names == 1)) {
 
+	    ap_pool_join(r->pool, rr->pool);
             error_notfound = rr->status;
             r->notes = ap_overlay_tables(r->pool, r->notes, rr->notes);
             r->headers_out = ap_overlay_tables(r->pool, r->headers_out,
                                             rr->headers_out);
             r->err_headers_out = ap_overlay_tables(r->pool, r->err_headers_out,
                                                 rr->err_headers_out);
-            ap_destroy_sub_req(rr);
             return error_notfound;
         }
 


Mime
  • Unnamed multipart/mixed (inline, None, 0 bytes)
View raw message