Changes with Apache 2.0.53
+ *) mod_rewrite: Handle per-location rules when r->filename is unset.
+ Previously this would segfault or simply not match as expected,
+ depending on the platform. [Jeff Trawick]
+
*) mod_rewrite: Fix query string handling for proxied URLs. PR 14518.
[michael teitler <michael.teitler cetelem.fr>,
Jan Kratochvil <rcpt-dev.AT.httpd.apache.org jankratochvil.net>]
APACHE 2.0 STATUS: -*-text-*-
-Last modified at [$Date: 2004/10/13 17:12:08 $]
+Last modified at [$Date: 2004/10/13 17:23:10 $]
Release:
+1: nd, jerenkrantz, minfrin
minfrin: applied to v2.0
- *) mod_rewrite: Handle per-location rules when r->filename is unset.
- Previously this would segfault or simply not match as expected,
- depending on the platform.
- modules/mappers/mod_rewrite.c: r1.260
- +1: trawick, geoff, jerenkrantz
-
*) mod_headers: Support {...}s tag for SSL variable lookup.
http://www.apache.org/~jorton/mod_headers-2.0-ssl.diff
+1: jorton, trawick
* remember the current filename before rewriting for later check
* to prevent deadlooping because of internal redirects
* on final URL/filename which can be equal to the inital one.
+ * also, we'll restore original r->filename if we decline this
+ * request
*/
ofilename = r->filename;
+ if (r->filename == NULL) {
+ r->filename = apr_pstrdup(r->pool, r->uri);
+ rewritelog((r, 2, "init rewrite engine with requested uri %s",
+ r->filename));
+ }
+
/*
* now apply the rules ...
*/
* use the following internal redirection stuff because
* this would lead to a deadloop.
*/
- if (strcmp(r->filename, ofilename) == 0) {
+ if (ofilename != NULL && strcmp(r->filename, ofilename) == 0) {
rewritelog(r, 1, "[per-dir %s] initial URL equal rewritten "
"URL: %s [IGNORING REWRITE]",
dconf->directory, r->filename);
else {
rewritelog(r, 1, "[per-dir %s] pass through %s",
dconf->directory, r->filename);
+ r->filename = ofilename;
return DECLINED;
}
}