httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 10932] - Allow Negative regex in LocationMatch
Date Thu, 31 Mar 2005 09:54:20 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=10932>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=10932


warp-9.9@usa.net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |warp-9.9@usa.net




------- Additional Comments From warp-9.9@usa.net  2005-03-31 11:54 -------
It would be spectacular to see a simple, no-nonsense negation.  From
what I understand after skimming the PCRE man page, this has to be
external to the regexp because of the nature of regexp matching.
Probably why it was never implemented, because it's extra work.  Maybe
other things needed more attention so this was put aside, then
forgotten about.

FYI for those searching for answers, the "^/(?!bar)" syntax is referred
to as a negative assertion.  It has some subtle syntax and can be a bit
confusing for the novice PCRE user even in a simple case, which may be
many of the admin running Apache.  I'm not too familiar with how nice it
plays with more complex regular expressions.

In the config file, it's difficult if not impossible to specify each
negative Match rule for every possible negative Match condition when the
negative results may change frequently and at random, yet the positive
Match are few and static.  These cases seem to be very common.  If a
regexp does not match the right answer, tell me it's the wrong answer.
I won't sit and try to pre-define every conceivable wrong answer in the
universe, when there are maybe 3-4 right answers that I care about.
That is computationally wasteful and redundant.

LocationMatch is part of the core.  What if I don't want to use
mod_rewrite for every tiny thing that isn't properly implemented in the
core?  I want to keep the server lean.  It's a shame to have to include
another module to do something that LocationMatch (from the view of a
sysadmin) should be able to handle within it's own syntax.  It's 95%
there already when the PCRE returns and finds that there was no match.
The PCRE function returns -1?  So if there's a "!" negation character,
check for "-1" return, and if so valued, perform the action specified.

I'd have to look into the code and research more to see if there were
any patches or to generate one.  I'm surprised that in all this time
there have been no patches.  Maybe it's uglier than I think in there.


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message