Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

*) Allow crawling of dynamic urls if configured

theli1c7f0789c905
diff --git a/source/de/anomic/urlRedirector/urlRedirector.pl b/source/de/anomic/urlRedirector/urlRedirector.pl
index a6c483df1..7c6918e41 100644
--- a/source/de/anomic/urlRedirector/urlRedirector.pl
+++ b/source/de/anomic/urlRedirector/urlRedirector.pl
@@ -18,6 +18,9 @@ my $pwd = "";
my $host = "localhost";
my $port = "8080";
+my $allowCgi = 0;
+my $allowPost = 0;
+
my @mediaExt;
my @requestData;
@@ -96,14 +99,14 @@ while (defined($msg_out = <>)) {
@requestData = split(/\s+/, $msg_out);
# testing if the URL is CGI
- if (isCGI($requestData[0])) {
+ if (!$allowCgi && isCGI($requestData[0])) {
print STDOUT CRLF;
print STDERR "URL is cgi: ".$msg_out.CRLF;
next;
}
# testing if the URL is a POST request
- if (isPOST($requestData[0])){
+ if (!$allowPost && isPOST($requestData[0])){
print STDOUT CRLF;
print STDERR "URL is post: ".$msg_out.CRLF;
next;
diff --git a/source/de/anomic/urlRedirector/urlRedirectord.java b/source/de/anomic/urlRedirector/urlRedirectord.java
index e53587064..30d8b1108 100644
--- a/source/de/anomic/urlRedirector/urlRedirectord.java
+++ b/source/de/anomic/urlRedirector/urlRedirectord.java
@@ -143,11 +143,20 @@ public class urlRedirectord implements serverHandler {
int pos = line.indexOf(" ");
if (pos != -1) {
String newDepth = line.substring(pos).trim();
- this.theLogger.logFine("Changing crawling depth to '" + newDepth);
+ this.theLogger.logFine("Changing crawling depth to '" + newDepth + "'.");
profile.changeEntry("generalDepth",newDepth);
}
outputWriter.print("\r\n");
outputWriter.flush();
+ } else if (line.startsWith("CRAWLDYNAMIC")) {
+ int pos = line.indexOf(" ");
+ if (pos != -1) {
+ String newValue = line.substring(pos).trim();
+ this.theLogger.logFine("Changing crawl dynamic setting to '" + newValue + "'");
+ profile.changeEntry("crawlingQ",newValue);
+ }
+ outputWriter.print("\r\n");
+ outputWriter.flush();
} else {
if (!authenticated) {
return Boolean.FALSE;