From: Justin Erenkrantz Date: Fri, 15 Feb 2002 07:43:20 +0000 (+0000) Subject: Fix ap_directory_walk() per-dir merge bug seen when no is X-Git-Tag: 2.0.33~250 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4606f607c7e95bfe8d8d2f585dc6eed336b369c9;p=apache Fix ap_directory_walk() per-dir merge bug seen when no is present. showstoppers-- Kudos to Jeff for finding it. Kudos to BrianP for leading us in the right direction. Kudos to OtherBill for pointing out the right way to fix this. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93425 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index e898f4a80d..d6feb55f37 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,8 @@ Changes with Apache 2.0.33-dev + *) Fix ap_directory_merge() to correctly merge configs when there is + no block. [Justin Erenkrantz, William Rowe] + *) Remove spurious debug messsages that are normal under HTTP keep-alive logic. [Jeff Trawick, Justin Erenkrantz] diff --git a/STATUS b/STATUS index 5888127c70..5b924b3ba7 100644 --- a/STATUS +++ b/STATUS @@ -1,5 +1,5 @@ APACHE 2.0 STATUS: -*-text-*- -Last modified at [$Date: 2002/02/15 05:22:16 $] +Last modified at [$Date: 2002/02/15 07:43:19 $] Release: @@ -52,16 +52,6 @@ CURRENT RELEASE NOTES: FINAL RELEASE SHOWSTOPPERS: - * ap_directory_walk skips some per-dir config merge functions - if there is no "" block in the configuration - Message-ID: - * That is very unlikely, merges are additive. Much more likely, - the default SetOutputFilter default or merge is borked. - Unless it's the code that permits 'null' merges, per module. - Still, it's probably in SetOutputFilter's behavior. - * BrianP notes: directory_walk's handling of trailing slashes - appears to be the cause: <3C1CF721.1090300@pacbell.net> - * If any request gets to the core handler, without a flag that this r->filename was tested by dir/file_walk, we need to 500 at the very end of the ap_process_request_internal() processing. This provides diff --git a/server/request.c b/server/request.c index 030056148f..7d3cc6c22b 100644 --- a/server/request.c +++ b/server/request.c @@ -712,9 +712,10 @@ AP_DECLARE(int) ap_directory_walk(request_rec *r) char *delim; int temp_slash=0; - /* We have no trailing slash, but we sure would appreciate one... + /* We have no trailing slash, but we sure would appreciate one. + * However, we don't want to append a / our first time through. */ - if (sec_idx && r->filename[filename_len-1] != '/') { + if ((seg > startseg) && r->filename[filename_len-1] != '/') { r->filename[filename_len++] = '/'; r->filename[filename_len] = 0; temp_slash=1;