labs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thors...@apache.org
Subject svn commit: r656622 - /labs/droids/trunk/src/core/java/org/apache/droids/protocol/http/Http.java
Date Thu, 15 May 2008 12:21:41 GMT
Author: thorsten
Date: Thu May 15 05:21:41 2008
New Revision: 656622

URL: http://svn.apache.org/viewvc?rev=656622&view=rev
Log:
Sometimes norbert should allow all urls even the robots rules deny the access.

Modified:
    labs/droids/trunk/src/core/java/org/apache/droids/protocol/http/Http.java

Modified: labs/droids/trunk/src/core/java/org/apache/droids/protocol/http/Http.java
URL: http://svn.apache.org/viewvc/labs/droids/trunk/src/core/java/org/apache/droids/protocol/http/Http.java?rev=656622&r1=656621&r2=656622&view=diff
==============================================================================
--- labs/droids/trunk/src/core/java/org/apache/droids/protocol/http/Http.java (original)
+++ labs/droids/trunk/src/core/java/org/apache/droids/protocol/http/Http.java Thu May 15 05:21:41
2008
@@ -34,6 +34,8 @@
     public static final Log LOG = LogFactory.getLog(Http.class);
 
     private URL robotsUrl;
+    
+    private boolean forceAllow=false;
 
     public Http() {
     }
@@ -60,6 +62,9 @@
     }
 
     public boolean isAllowed(String location) throws MalformedURLException {
+      if(forceAllow)
+        return forceAllow;
+      
         URL base = new URL(location);
         String prefix = UrlHelper.getUrlPrefix(base);
         robotsUrl = UrlHelper.findRobotsUrl(base,prefix);
@@ -79,5 +84,13 @@
         return test;
     }
 
+    public boolean isForceAllow() {
+      return forceAllow;
+    }
+
+    public void setForceAllow(boolean forceAllow) {
+      this.forceAllow = forceAllow;
+    }
+
 
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@labs.apache.org
For additional commands, e-mail: commits-help@labs.apache.org


Mime
View raw message