httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
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

--- Comment #11 from Eric Covener <>  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:
------- You are receiving this mail because: -------
You are the assignee for the bug.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message