summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--defaults/yacy.init5
-rw-r--r--htroot/IndexFederated_p.html2
-rw-r--r--source/net/yacy/htroot/IndexFederated_p.java2
-rw-r--r--source/net/yacy/htroot/yacy/transferRWI.java2
-rw-r--r--source/net/yacy/htroot/yacy/transferURL.java2
-rw-r--r--source/net/yacy/search/SwitchboardConstants.java1
6 files changed, 8 insertions, 6 deletions
diff --git a/defaults/yacy.init b/defaults/yacy.init
index 0d2fc0dc3..810f68614 100644
--- a/defaults/yacy.init
+++ b/defaults/yacy.init
@@ -587,8 +587,9 @@ indexReceiveBlockErrors=true
indexReceiveBlockErrors.retryAfterDays=30
# Comma-separated list of HTTP status codes considered permanent errors (always block)
-# Default: 404 (Not Found), 410 (Gone)
-indexReceiveBlockErrors.permanentStatus=404,410
+# -1 = DNS/Network errors (UnknownHost, connection failures)
+# 404 = Not Found, 410 = Gone
+indexReceiveBlockErrors.permanentStatus=404,410,-1
# the frequency is the number of links per minute, that the peer allowes
# _every_ other peer to send to this peer
diff --git a/htroot/IndexFederated_p.html b/htroot/IndexFederated_p.html
index 652899a48..c50c95137 100644
--- a/htroot/IndexFederated_p.html
+++ b/htroot/IndexFederated_p.html
@@ -125,7 +125,7 @@
<dd><input type="text" name="indexReceiveBlockErrors.retryAfterDays" value="#[indexReceiveBlockErrors.retryAfterDays]#" size="4" /> for temporary errors; permanent errors stay blocked.</dd>
<dt class="TableCellDark">Permanent error statuses</dt>
- <dd><input type="text" name="indexReceiveBlockErrors.permanentStatus" value="#[indexReceiveBlockErrors.permanentStatus]#" size="12" /> comma-separated (default: 404,410)</dd>
+ <dd><input type="text" name="indexReceiveBlockErrors.permanentStatus" value="#[indexReceiveBlockErrors.permanentStatus]#" size="15" /> comma-separated (default: 404,410,-1; -1=DNS/network errors)</dd>
<dt><input type="submit" name="setrwi" class="btn btn-primary" value="Set" /></dt><dd></dd>
</dl>
diff --git a/source/net/yacy/htroot/IndexFederated_p.java b/source/net/yacy/htroot/IndexFederated_p.java
index 9b7e8f74c..4acf5d996 100644
--- a/source/net/yacy/htroot/IndexFederated_p.java
+++ b/source/net/yacy/htroot/IndexFederated_p.java
@@ -72,7 +72,7 @@ public class IndexFederated_p {
final int retryDays = post.getInt(SwitchboardConstants.INDEX_RECEIVE_BLOCK_ERRORS_RETRY_DAYS, 30);
env.setConfig(SwitchboardConstants.INDEX_RECEIVE_BLOCK_ERRORS_RETRY_DAYS, retryDays);
- final String permanent = post.get(SwitchboardConstants.INDEX_RECEIVE_BLOCK_ERRORS_PERMANENT, "404,410");
+ final String permanent = post.get(SwitchboardConstants.INDEX_RECEIVE_BLOCK_ERRORS_PERMANENT, "404,410,-1");
env.setConfig(SwitchboardConstants.INDEX_RECEIVE_BLOCK_ERRORS_PERMANENT, permanent);
}
diff --git a/source/net/yacy/htroot/yacy/transferRWI.java b/source/net/yacy/htroot/yacy/transferRWI.java
index d02875334..38c0bbbc4 100644
--- a/source/net/yacy/htroot/yacy/transferRWI.java
+++ b/source/net/yacy/htroot/yacy/transferRWI.java
@@ -246,7 +246,7 @@ public final class transferRWI {
// Get configuration
final int retryAfterDays = sb.getConfigInt(SwitchboardConstants.INDEX_RECEIVE_BLOCK_ERRORS_RETRY_DAYS, 30);
- final String permanentStatusStr = sb.getConfig(SwitchboardConstants.INDEX_RECEIVE_BLOCK_ERRORS_PERMANENT, "404,410");
+ final String permanentStatusStr = sb.getConfig(SwitchboardConstants.INDEX_RECEIVE_BLOCK_ERRORS_PERMANENT, "404,410,-1");
final Set<Integer> permanentStatus = new HashSet<Integer>();
for (String s : permanentStatusStr.split(",")) {
try { permanentStatus.add(Integer.parseInt(s.trim())); } catch (NumberFormatException e) {}
diff --git a/source/net/yacy/htroot/yacy/transferURL.java b/source/net/yacy/htroot/yacy/transferURL.java
index 2ca3f533a..07af06601 100644
--- a/source/net/yacy/htroot/yacy/transferURL.java
+++ b/source/net/yacy/htroot/yacy/transferURL.java
@@ -154,7 +154,7 @@ public final class transferURL {
doublecheck = 0;
final boolean blockErrors = sb.getConfigBool(SwitchboardConstants.INDEX_RECEIVE_BLOCK_ERRORS, true);
final int retryAfterDays = sb.getConfigInt(SwitchboardConstants.INDEX_RECEIVE_BLOCK_ERRORS_RETRY_DAYS, 30);
- final String permanentStatusStr = sb.getConfig(SwitchboardConstants.INDEX_RECEIVE_BLOCK_ERRORS_PERMANENT, "404,410");
+ final String permanentStatusStr = sb.getConfig(SwitchboardConstants.INDEX_RECEIVE_BLOCK_ERRORS_PERMANENT, "404,410,-1");
final Set<Integer> permanentStatus = new HashSet<Integer>();
for (String s : permanentStatusStr.split(",")) {
try { permanentStatus.add(Integer.parseInt(s.trim())); } catch (NumberFormatException e) {}
diff --git a/source/net/yacy/search/SwitchboardConstants.java b/source/net/yacy/search/SwitchboardConstants.java
index 3873e15eb..0e391e8ac 100644
--- a/source/net/yacy/search/SwitchboardConstants.java
+++ b/source/net/yacy/search/SwitchboardConstants.java
@@ -209,6 +209,7 @@ public final class SwitchboardConstants {
public static final String INDEX_RECEIVE_BLOCK_BLACKLIST = "indexReceiveBlockBlacklist";
public static final String INDEX_RECEIVE_BLOCK_ERRORS = "indexReceiveBlockErrors";
public static final String INDEX_RECEIVE_BLOCK_ERRORS_RETRY_DAYS = "indexReceiveBlockErrors.retryAfterDays";
+ /** Permanent error HTTP status codes (comma-separated). Default: 404,410,-1 (-1=DNS/network errors) */
public static final String INDEX_RECEIVE_BLOCK_ERRORS_PERMANENT = "indexReceiveBlockErrors.permanentStatus";
/**