Mailing List Archive

[Bug 53023] mod_rewrite RewriteCond parser error and documentation inconsistency
https://issues.apache.org/bugzilla/show_bug.cgi?id=53023

--- Comment #8 from Axel Reinhold <apache@freakout.de> ---
the proposed patch break the historical but still documented and used -l usage.
this new patch fixes the -lt and left the -l usable:
--- modules/mappers/mod_rewrite.c Thu Jan 26 20:15:41 2012
+++ modules/mappers/mod_rewrite.c Fri May 4 14:01:13 2012
@@ -3249,16 +3249,19 @@
case 's': newcond->ptype = CONDPAT_FILE_SIZE; break;
case 'd': newcond->ptype = CONDPAT_FILE_DIR; break;
case 'x': newcond->ptype = CONDPAT_FILE_XBIT; break;
+ case 'l': newcond->ptype = CONDPAT_FILE_LINK; break;
case 'h': newcond->ptype = CONDPAT_FILE_LINK; break;
case 'L': newcond->ptype = CONDPAT_FILE_LINK; break;
case 'U': newcond->ptype = CONDPAT_LU_URL; break;
case 'F': newcond->ptype = CONDPAT_LU_FILE; break;
+ }
+ }
+ else if (*a2 == '-') {
+ switch (a2[1]) {
case 'l': if (a2[2] == 't')
a2 += 3, newcond->ptype = CONDPAT_INT_LT;
else if (a2[2] == 'e')
a2 += 3, newcond->ptype = CONDPAT_INT_LE;
- else /* Historical; prefer -L or -h instead */
- newcond->ptype = CONDPAT_FILE_LINK;
break;
case 'g': if (a2[2] == 't')
a2 += 3, newcond->ptype = CONDPAT_INT_GT;

--
You are receiving this mail because:
You are the assignee for the bug.