Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 8724 invoked from network); 1 Apr 2009 12:59:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 1 Apr 2009 12:59:55 -0000 Received: (qmail 53209 invoked by uid 500); 1 Apr 2009 12:59:53 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 53140 invoked by uid 500); 1 Apr 2009 12:59:53 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 53129 invoked by uid 99); 1 Apr 2009 12:59:53 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Apr 2009 12:59:53 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of torsten.foertsch@gmx.net designates 213.165.64.20 as permitted sender) Received: from [213.165.64.20] (HELO mail.gmx.net) (213.165.64.20) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 01 Apr 2009 12:59:45 +0000 Received: (qmail invoked by alias); 01 Apr 2009 12:59:23 -0000 Received: from p57A5B76B.dip.t-dialin.net (EHLO opi.home) [87.165.183.107] by mail.gmx.net (mp019) with SMTP; 01 Apr 2009 14:59:23 +0200 X-Authenticated: #1700068 X-Provags-ID: V01U2FsdGVkX1/FiXYhRkPF/Rl6jf47lF7Jnelx+s7++/YtBQoC3q +f9Ri8mSwxAvDE From: Torsten Foertsch To: dev@httpd.apache.org Subject: Re: 2.2.11 & mod_include Date: Wed, 1 Apr 2009 13:59:38 +0100 User-Agent: KMail/1.9.10 Cc: Dan Poirier References: <200903311734.39492.torsten.foertsch@gmx.net> <20090331153941.GA14783@eilebrecht.net> <87ljqkimse.fsf@poir9.raleigh.ibm.com> In-Reply-To: <87ljqkimse.fsf@poir9.raleigh.ibm.com> MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_7U20JTlV8KEfjyG" Message-Id: <200904011459.39153.torsten.foertsch@gmx.net> X-Y-GMX-Trusted: 0 X-FuHaFi: 0.61 X-Virus-Checked: Checked by ClamAV on apache.org --Boundary-00=_7U20JTlV8KEfjyG Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Wed 01 Apr 2009, Dan Poirier wrote: > Lars Eilebrecht writes: > > Torsten Foertsch wrote: > > > > [mod_include DATE_LOCAL bug] > > > >> Is this a known bug? > > > > It's probably this one: > > https://issues.apache.org/bugzilla/show_bug.cgi?id=3D39369 > > I think that's right. =A0It's a test for Joe's fix for 39369, that has > only been applied to trunk. =A0It would be nice to backport that fix so > the stable release doesn't fail tests (or else do something with that > test). Here is a patch that works for 2.2.11. The mod_rerwite patch cures the=20 failure in t/modules/rewrite.t: https://issues.apache.org/bugzilla/show_bug.cgi?id=3D46428 in 2.2.11. The mod_info problem in my original mail was caused by my local setup=20 and is rather a Apache::Test problem (if at all). I have 2 modperl=20 versions installed, mod_perl-debug.so and mod_perl.so. That has=20 confused the test. Should I attach these patches to the problem reports in bugzilla or is=20 that useless because they wont be backported officially? Torsten =2D-=20 Need professional mod_perl support? Just hire me: torsten.foertsch@gmx.net --Boundary-00=_7U20JTlV8KEfjyG Content-Type: text/x-diff; charset="iso-8859-1"; name="modrewrite_PR46428.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="modrewrite_PR46428.diff" --- modules/mappers/mod_rewrite.c.xx 2009-04-01 11:28:01.000000000 +0200 +++ modules/mappers/mod_rewrite.c 2009-04-01 11:35:28.000000000 +0200 @@ -3869,7 +3869,20 @@ * ourself). */ if (p->flags & RULEFLAG_PROXY) { - /* PR#39746: Escaping things here gets repeated in mod_proxy */ + /* For rules evaluated in server context, the mod_proxy fixup + * hook can be relied upon to escape the URI as and when + * necessary, since it occurs later. If in directory context, + * the ordering of the fixup hooks is forced such that + * mod_proxy comes first, so the URI must be escaped here + * instead. See PR 39746, 46428, and other headaches. */ + if (ctx->perdir && (p->flags & RULEFLAG_NOESCAPE) == 0) { + char *old_filename = r->filename; + + r->filename = ap_escape_uri(r->pool, r->filename); + rewritelog((r, 2, ctx->perdir, "escaped URI in per-dir context " + "for proxy, %s -> %s", old_filename, r->filename)); + } + fully_qualify_uri(r); rewritelog((r, 2, ctx->perdir, "forcing proxy-throughput with %s", --Boundary-00=_7U20JTlV8KEfjyG Content-Type: text/x-diff; charset="iso 8859-15"; name="modinc_timefmt-2.2.11.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="modinc_timefmt-2.2.11.diff" --- modules/filters/mod_include.c.orig 2008-03-17 15:32:47.000000000 +0100 +++ modules/filters/mod_include.c 2009-04-01 14:45:41.000000000 +0200 @@ -580,7 +580,7 @@ *p = '\0'; } -static void add_include_vars(request_rec *r, const char *timefmt) +static void add_include_vars(request_rec *r) { apr_table_t *e = r->subprocess_env; char *t; @@ -608,26 +608,17 @@ } } -static const char *add_include_vars_lazy(request_rec *r, const char *var) +static const char *add_include_vars_lazy(request_rec *r, const char *var, const char *timefmt) { char *val; if (!strcasecmp(var, "DATE_LOCAL")) { - include_dir_config *conf = - (include_dir_config *)ap_get_module_config(r->per_dir_config, - &include_module); - val = ap_ht_time(r->pool, r->request_time, conf->default_time_fmt, 0); + val = ap_ht_time(r->pool, r->request_time, timefmt, 0); } else if (!strcasecmp(var, "DATE_GMT")) { - include_dir_config *conf = - (include_dir_config *)ap_get_module_config(r->per_dir_config, - &include_module); - val = ap_ht_time(r->pool, r->request_time, conf->default_time_fmt, 1); + val = ap_ht_time(r->pool, r->request_time, timefmt, 1); } else if (!strcasecmp(var, "LAST_MODIFIED")) { - include_dir_config *conf = - (include_dir_config *)ap_get_module_config(r->per_dir_config, - &include_module); - val = ap_ht_time(r->pool, r->finfo.mtime, conf->default_time_fmt, 0); + val = ap_ht_time(r->pool, r->finfo.mtime, timefmt, 0); } else if (!strcasecmp(var, "USER_NAME")) { if (apr_uid_name_get(&val, r->finfo.user, r->pool) != APR_SUCCESS) { @@ -684,7 +675,7 @@ val = apr_table_get(r->subprocess_env, var); if (val == LAZY_VALUE) { - val = add_include_vars_lazy(r, var); + val = add_include_vars_lazy(r, var, ctx->time_str); } } @@ -2423,7 +2414,7 @@ /* get value */ val_text = elts[i].val; if (val_text == LAZY_VALUE) { - val_text = add_include_vars_lazy(r, elts[i].key); + val_text = add_include_vars_lazy(r, elts[i].key, ctx->time_str); } val_text = ap_escape_html(ctx->dpool, elts[i].val); v_len = strlen(val_text); @@ -3608,7 +3599,7 @@ * environment */ ap_add_common_vars(r); ap_add_cgi_vars(r); - add_include_vars(r, conf->default_time_fmt); + add_include_vars(r); } /* Always unset the content-length. There is no way to know if * the content will be modified at some point by send_parsed_content. --Boundary-00=_7U20JTlV8KEfjyG--