*) Allow crawling of dynamic urls if configured

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1298 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
theli 19 years ago
parent 15b4e16591
commit 1c7f0789c9

@ -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;

@ -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;

Loading…
Cancel
Save