ASF Bugzilla – Attachment 18910 Details for
Bug 38642
mod_rewrite adds path info postfix after a substitution occured
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Rush patch used some time ago against 2.0.55
patch.txt (text/plain), 2.52 KB, created by
Bob Ionescu
on 2006-09-25 10:52:12 UTC
(
hide
)
Description:
Rush patch used some time ago against 2.0.55
Filename:
MIME Type:
Creator:
Bob Ionescu
Created:
2006-09-25 10:52:12 UTC
Size:
2.52 KB
patch
obsolete
>--- mod_rewrite.c.orig 2005-05-25 12:05:06.000000000 +0200 >+++ mod_rewrite.c 2006-03-09 22:36:12.470704000 +0100 >@@ -1691,6 +1691,7 @@ > "[INTERNAL REDIRECT]", dconf->directory, r->filename); > r->filename = apr_pstrcat(r->pool, "redirect:", r->filename, NULL); > r->handler = "redirect-handler"; >+ apr_table_unset(r->notes,"substapplied"); > return OK; > } > } >@@ -1874,6 +1875,7 @@ > r->filename = apr_pstrcat(r->pool, "forbidden:", > r->filename, NULL); > changed = ACTION_NORMAL; >+ apr_table_unset(r->notes,"substapplied"); > break; > } > >@@ -1885,6 +1887,7 @@ > rewritelog(r, 2, "forcing '%s' to be gone", r->filename); > r->filename = apr_pstrcat(r->pool, "gone:", r->filename, NULL); > changed = ACTION_NORMAL; >+ apr_table_unset(r->notes,"substapplied"); > break; > } > >@@ -1893,6 +1896,7 @@ > * last-rule and new-round flags. > */ > if (p->flags & RULEFLAG_PROXY) { >+ apr_table_unset(r->notes,"substapplied"); > break; > } > if (p->flags & RULEFLAG_LASTRULE) { >@@ -1966,9 1970,15 @@ > > /* > * Add (perhaps splitted away) PATH_INFO postfix to URL to >- * make sure we really match against the complete URL. >+ * make sure we really match against the complete URL, but skip >+ * if a substitution already occurred > */ >- if (perdir != NULL && r->path_info != NULL && r->path_info[0] != '\0') { >+ if (apr_table_get(r->notes,"substapplied") && perdir != NULL && >+ r->path_info != NULL && r->path_info[0] != '\0') { >+ rewritelog(r, 5, "[per-dir %s] ignoring path info postfix '%s', substitution already occurred: %s", >+ perdir, r->path_info, uri); >+ } >+ else if (perdir != NULL && r->path_info != NULL && r->path_info[0] != '\0') { > rewritelog(r, 3, "[per-dir %s] add path info postfix: %s -> %s%s", > perdir, uri, uri, r->path_info); > uri = apr_pstrcat(r->pool, uri, r->path_info, NULL); >@@ -2158,6 +2168,7 @@ > rewritelog(r, 2, "rewrite %s -> %s", uri, newuri); > } > else { >+ apr_table_set(r->notes,"substapplied","true"); > rewritelog(r, 2, "[per-dir %s] rewrite %s -> %s", perdir, uri, newuri); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 38642
:
17689
| 18910