From: William A. Rowe Jr Date: Thu, 23 Aug 2001 21:05:42 +0000 (+0000) Subject: Two cases we are certain of canonical correctness X-Git-Tag: 2.0.25~119 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=13cff90a552252c8b9c9e921b498571264c037cc;p=apache Two cases we are certain of canonical correctness git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90586 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/http/http_request.c b/modules/http/http_request.c index 8c8584fdfa..d5de0a676f 100644 --- a/modules/http/http_request.c +++ b/modules/http/http_request.c @@ -569,6 +569,7 @@ AP_DECLARE(void) ap_internal_fast_redirect(request_rec *rr, request_rec *r) r->uri = rr->uri; r->args = rr->args; r->filename = rr->filename; + r->canonical_filename = rr->canonical_filename; r->handler = rr->handler; r->content_type = rr->content_type; r->content_encoding = rr->content_encoding; diff --git a/modules/mappers/mod_dir.c b/modules/mappers/mod_dir.c index 13ff29abbe..6097e0a8cb 100644 --- a/modules/mappers/mod_dir.c +++ b/modules/mappers/mod_dir.c @@ -161,7 +161,11 @@ static int handle_dir(request_rec *r) */ if (r->filename[strlen(r->filename) - 1] != '/') { + if (r->filename != r->canonical_filename) + r->canonical_filename = NULL; r->filename = apr_pstrcat(r->pool, r->filename, "/", NULL); + if (r->canonical_filename) + r->canonical_filename = r->filename; } if (d->index_names) {