You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by William Stapleton <wl...@uwm.edu> on 1997/12/20 00:21:45 UTC
mod_rewrite/1579: Some length patterns fail with "$", ".*", "[]"
>Number: 1579
>Category: mod_rewrite
>Synopsis: Some length patterns fail with "$", ".*", "[]"
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: apache
>State: open
>Class: sw-bug
>Submitter-Id: apache
>Arrival-Date: Fri Dec 19 15:30:00 PST 1997
>Last-Modified:
>Originator: wls@uwm.edu
>Organization:
apache
>Release: 1.3b3
>Environment:
Digital Unix on alpha, OSF1 ratbert.imt.uwm.edu V3.2 62 alpha, gcc 2.7.0
>Description:
I have an NCSA-imagemap conversion pattern that works fine on 1.2.4:
RewriteRule ^/cgi-bin/imagemap/(.*\.[mM][aA][pP])$ /$1
However, this doesn't match under 1.3b3, but does match if I remove the "$":
RewriteRule ^/cgi-bin/imagemap/(.*\.[mM][aA][pP]) /$1
Experimentation with various patterns seems to indicate this has
something to do with the number of characters. These also fail:
RewriteRule ^/ccccccc/iiiiiiii/(.*\.[mM][aA][pP])$ /x
RewriteRule ^/ccccccc/iiiiiiiii/(.*\.[mM][aA][pP])$ /x
But work with the "$" removed. This works WITH "$":
RewriteRule ^/ccccccc/iiiiiii/(.*\.[mM][aA][pP])$ /x
By fail, I mean that the rewrite log indicates the pattern didn't match. E. g.:
40023860][rid#14003e910/initial] (3) applying pattern '^/ccccccc/iiiiiiii/(.*\.[
mM][aA][pP])$' to uri '/ccccccc/iiiiiiii/blah.map'
toocold4rats.csd.uwm.edu - - [19/Dec/1997:16:58:24 -0600] [ego.csd.uwm.edu/sid#1
40023860][rid#14003e910/initial] (1) pass through /ccccccc/iiiiiiii/blah.map
I think all of my failures used the ".*" and "[]" matches. One thinks maybe
they're accidentally adding characters to the end of a buffer?
>How-To-Repeat:
Try above rewrite patterns, check rewrite.log to see if they match properly,
or rewrite to obvious URLs...
>Fix:
No. I didn't look at the code, and I'm tired of futzing with my server today..
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, ]
[you need to include <ap...@Apache.Org> in the Cc line ]
[and leave the subject line UNCHANGED. This is not done]
[automatically because of the potential for mail loops. ]