https://issues.apache.org/bugzilla/show_bug.cgi?id=51434
Bug #: 51434
Summary: Unable to use (forward) slashes in a FilterProvider
regex
Product: Apache httpd-2
Version: 2.2.17
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: mod_filter
AssignedTo: [email protected]
ReportedBy: [email protected]
Classification: Unclassified
For example the following FilterProvider will cause an internal server error.
("Bad regexp" in the error_log)
FilterDeclare COMPRESS
FilterProvider COMPRESS DEFLATE resp=Content-Type /text\/(html|css)/
FilterChain COMPRESS
FilterProtocol COMPRESS change=yes;byteranges=no
After looking at the actual code (My c/c++ knowledge is only limited) it seems
the second (forward) slash is always the delimiter of the regex, even when it's
escaped. Then it tries to parse the regex 'text\', this is indeed a bad regexp.
http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/modules/filters/mod_filter.c?view=markup#l577
So it seems it's impossible to use a forward slash in a FilterProvider regex.
I found out about this issue while looking at the usage of mod_filter in
html5boilerplate. For more information see this issue:
https://github.com/paulirish/html5-boilerplate/issues/549#issuecomment-1330675
I tested this using Apache/2.2.17 on Ubuntu 11.04
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]