Merge pull request #13 from travisfw/master

have TooManyPathSegmentsDecideRule count path segments only
This commit is contained in:
Travis Wellman
2012-07-03 13:31:23 -07:00
@@ -63,11 +63,11 @@ public class TooManyPathSegmentsDecideRule extends PredicatedDecideRule {
*/
@Override
protected boolean evaluate(CrawlURI curi) {
String uri = curi.toString();
String uriPath = curi.getUURI().getEscapedPath();
int count = 0;
int threshold = getMaxPathDepth();
for (int i = 0; i < uri.length(); i++) {
if (uri.charAt(i) == '/') {
for (int i = 0; i < uriPath.length(); i++) {
if (uriPath.charAt(i) == '/') {
count++;
}
if (count > threshold) {