You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2011/06/26 04:44:04 UTC
svn commit: r1139686 - /trafficserver/plugins/geoip_acl/acl.h
Author: zwoop
Date: Sun Jun 26 02:44:03 2011
New Revision: 1139686
URL: http://svn.apache.org/viewvc?rev=1139686&view=rev
Log:
Special case for empty paths
Modified:
trafficserver/plugins/geoip_acl/acl.h
Modified: trafficserver/plugins/geoip_acl/acl.h
URL: http://svn.apache.org/viewvc/trafficserver/plugins/geoip_acl/acl.h?rev=1139686&r1=1139685&r2=1139686&view=diff
==============================================================================
--- trafficserver/plugins/geoip_acl/acl.h (original)
+++ trafficserver/plugins/geoip_acl/acl.h Sun Jun 26 02:44:03 2011
@@ -87,7 +87,11 @@ public:
bool match(const char* str, int len) const
{
- return (pcre_exec(_rex, _extra, str, len, 0, 0, NULL, 0) != -1);
+ // TODO: Not 100% sure this is absolutely correct, and not sure why adding
+ // PCRE_NOTEMPTY to the options doesn't work ...
+ if (0 == len)
+ return false;
+ return (pcre_exec(_rex, _extra, str, len, 0, PCRE_NOTEMPTY, NULL, 0) != -1);
}
void append(RegexAcl* ra);