You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@labs.apache.org by th...@apache.org on 2008/10/16 23:50:19 UTC
svn commit: r705372 -
/labs/droids/branch/LABS-144/src/core/java/org/apache/http/norobots/NoRobotClient.java
Author: thorsten
Date: Thu Oct 16 14:50:19 2008
New Revision: 705372
URL: http://svn.apache.org/viewvc?rev=705372&view=rev
Log:
LABS-190
concurrency error in NoRobotClient
Reporter/patch provider: Javier Puerto
gracias
Modified:
labs/droids/branch/LABS-144/src/core/java/org/apache/http/norobots/NoRobotClient.java
Modified: labs/droids/branch/LABS-144/src/core/java/org/apache/http/norobots/NoRobotClient.java
URL: http://svn.apache.org/viewvc/labs/droids/branch/LABS-144/src/core/java/org/apache/http/norobots/NoRobotClient.java?rev=705372&r1=705371&r2=705372&view=diff
==============================================================================
--- labs/droids/branch/LABS-144/src/core/java/org/apache/http/norobots/NoRobotClient.java (original)
+++ labs/droids/branch/LABS-144/src/core/java/org/apache/http/norobots/NoRobotClient.java Thu Oct 16 14:50:19 2008
@@ -203,10 +203,13 @@
"Illegal to use a different url, " + url.toExternalForm() +
", for this robots.txt: "+this.baseUrl.toExternalForm());
}
- String urlStr = url.toExternalForm().substring( this.baseUrl.toExternalForm().length() - 1);
- if("/robots.txt".equals(urlStr)) {
+
+ if(url.sameFile(baseUrl)) {
return true;
}
+
+ String urlStr = url.toExternalForm();
+
urlStr = URLDecoder.decode( urlStr );
Boolean allowed = this.rules.isAllowed( urlStr );
if(allowed == null) {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@labs.apache.org
For additional commands, e-mail: commits-help@labs.apache.org