@@ -120,30 +118,17 @@ public class BubbleBlockRuleDriver extends TrafficAnalyticsRuleDriver {
case allow: default:
case allow: default:
if (filter.hasReferer()) {
if (filter.hasReferer()) {
final URI refererURI = URIUtil.toUriOrNull(filter.getReferer());
if (refererURI == null) {
if (log.isInfoEnabled()) log.info(prefix+"invalid referer ("+filter.getReferer()+")");
} else {
if (log.isInfoEnabled()) log.info(prefix+"decision for URL was ALLOW, checking against referer: host="+refererURI.getHost()+", path="+refererURI.getPath());
final BlockDecision refererDecision = getDecision(refererURI.getHost(), refererURI.getPath(), filter.getUserAgent());
switch (refererDecision.getDecisionType()) {
case block:
if (log.isInfoEnabled()) log.info(prefix+"decision for URL was ALLOW but for referer is BLOCK");
final URI refererURI = URIUtil.toUriOrNull(filter.getReferer());
if (refererURI == null) {
if (log.isInfoEnabled()) log.info(prefix+"invalid referer ("+filter.getReferer()+")");
return null;
}
if (log.isInfoEnabled()) log.info(prefix+"decision for URL was ALLOW, checking against referer: host="+refererURI.getHost()+", path="+refererURI.getPath());
final String refererHost = refererURI.getHost();
final String refererPath = refererURI.getPath();
final String userAgent = filter.getUserAgent();
final BlockDecision refererDecision = getDecision(refererHost, refererPath, userAgent);
switch (refererDecision.getDecisionType()) {
case block:
if (log.isInfoEnabled()) log.info(prefix+"decision for URL was ALLOW but for referer is BLOCK");