You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Stephen Roderick <st...@gohome.net> on 2000/12/19 22:54:45 UTC

mod_rewrite/6997: Lost functionality betweeb 1.3.9 and 1.3.14 related to RewriteMaps

>Number:         6997
>Category:       mod_rewrite
>Synopsis:       Lost functionality betweeb 1.3.9 and 1.3.14 related to RewriteMaps
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    apache
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Tue Dec 19 14:00:03 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     steve-apache@gohome.net
>Release:        1.3.14
>Organization:
apache
>Environment:
Linux 2.2.16-3smp
>Description:
RewriteMap lowercase int:tolower
RewriteRule ^/([a-zA-Z]+)$    "${lowercase:$1}" [E=RRDEBUG:$1,R,L]

The $1 backref in ${lowercase:$1} is not expanded before passing to the tolower rewritemap func, instead tolower is called first and then an expansion is done. This worked the opposite 1.3.9. It is highly desirable that the expansion occur before the lookup NOT after the lookup.
>How-To-Repeat:

>Fix:
Well, you would have to rewrite the code with do_expand to rewrite first and then do the map lookup.
>Release-Note:
>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 make sure the]
 [subject line starts with the report component and number, with ]
 [or without any 'Re:' prefixes (such as "general/1098:" or      ]
 ["Re: general/1098:").  If the subject doesn't match this       ]
 [pattern, your message will be misfiled and ignored.  The       ]
 ["apbugs" address is not added to the Cc line of messages from  ]
 [the database automatically because of the potential for mail   ]
 [loops.  If you do not include this Cc, your reply may be ig-   ]
 [nored unless you are responding to an explicit request from a  ]
 [developer.  Reply only with text; DO NOT SEND ATTACHMENTS!     ]