You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by wr...@apache.org on 2002/04/22 19:06:35 UTC
cvs commit: apache-1.3/src/modules/standard mod_rewrite.c
wrowe 02/04/22 10:06:35
Modified: src/modules/standard mod_rewrite.c
Log:
Backport of httpd-2.0/modules/mappers/mod_rewrite.c 1.84
PR: 7492
Revision Changes Path
1.176 +4 -4 apache-1.3/src/modules/standard/mod_rewrite.c
Index: mod_rewrite.c
===================================================================
RCS file: /home/cvs/apache-1.3/src/modules/standard/mod_rewrite.c,v
retrieving revision 1.175
retrieving revision 1.176
diff -u -r1.175 -r1.176
--- mod_rewrite.c 16 Mar 2002 23:44:20 -0000 1.175
+++ mod_rewrite.c 22 Apr 2002 17:06:35 -0000 1.176
@@ -1220,7 +1220,7 @@
rewritelog(r, 2, "local path result: %s", r->filename);
/* the filename has to start with a slash! */
- if (r->filename[0] != '/') {
+ if (ap_os_is_path_absolute(r->filename)) {
return BAD_REQUEST;
}
@@ -1505,7 +1505,7 @@
}
/* the filename has to start with a slash! */
- if (r->filename[0] != '/') {
+ if (ap_os_is_path_absolute(r->filename)) {
return BAD_REQUEST;
}
@@ -1983,7 +1983,7 @@
* location, i.e. if it's not starting with either a slash
* or a fully qualified URL scheme.
*/
- if (prefixstrip && r->filename[0] != '/'
+ if (prefixstrip && !ap_os_is_path_absolute(r->filename)
&& !is_absolute_uri(r->filename)) {
rewritelog(r, 3, "[per-dir %s] add per-dir prefix: %s -> %s%s",
perdir, r->filename, perdir, r->filename);
@@ -2070,7 +2070,7 @@
* not start with a slash. Here we add again the initially
* stripped per-directory prefix.
*/
- if (prefixstrip && r->filename[0] != '/') {
+ if (prefixstrip && !ap_os_is_path_absolute(r->filename)) {
rewritelog(r, 3, "[per-dir %s] add per-dir prefix: %s -> %s%s",
perdir, r->filename, perdir, r->filename);
r->filename = ap_pstrcat(r->pool, perdir, r->filename, NULL);