httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 38642] mod_rewrite adds path info postfix after a substitution occured
Date Sun, 23 Nov 2008 02:40:14 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=38642





--- Comment #11 from Eric Covener <covener@gmail.com>  2008-11-22 18:40:14 PST ---
> The flag is stored in r->notes - I can't see where better to put it. It can't
> go in the ctx struct because the scope of that struct is a single rewrite list.
> (This is bad because multiple .htaccess files can match a single request.)
> Although for performance, a "cache" of the flag could be stored in the ctx
> struct, and saved to r->notes in between rewrite lists.

I am leaning towards whacking r->path_info as soon as we know we've effectively
made it useless by replacing r->filename in per-directory context, rather then
thinking harder about when we should spill r->path_info into ctx->uri by saving
info away in some previous step.

@@ -3981,6 +3986,11 @@
     /* Now adjust API's knowledge about r->filename and r->args */
     r->filename = newuri;
+
+    if (ctx->perdir && r->path_info && !(p->flags & RULEFLAG_KEEPPATHINFO))
{
+        r->path_info = '\0';
+    }

But I don't pretend to understand how someone might be relying on this
path_info from the original request floating around, so the meaning of the flag
might have to be inverted so that the current behavior is default.

Who knows how many .htaccess files are carefully working around this behavior
by  e.g. not propogating pieces of the URL that look like the existing
%{PATH_INFO} over in the substitution


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message