From 286442fbc5ce59eb8e22f58af01ea9301a6ba153 Mon Sep 17 00:00:00 2001 From: allo Date: Fri, 2 Sep 2005 06:26:38 +0000 Subject: [PATCH] do not Use YaCy-Sites as Referer, if useYacyReferer = false http://www.yacy-forum.de/viewtopic.php?p=8896#8896 git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@637 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- source/de/anomic/http/httpc.java | 3 ++- yacy.init | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/source/de/anomic/http/httpc.java b/source/de/anomic/http/httpc.java index 36d404081..b0cf142f8 100644 --- a/source/de/anomic/http/httpc.java +++ b/source/de/anomic/http/httpc.java @@ -559,7 +559,8 @@ public final class httpc { } // advertise a little bit... - if ((!(header.containsKey(httpHeader.REFERER))) || (((String) header.get(httpHeader.REFERER)).trim().length() == 0)) { + plasmaSwitchboard sb = plasmaSwitchboard.getSwitchboard(); + if ( (!(header.containsKey(httpHeader.REFERER))) || (((String) header.get(httpHeader.REFERER)).trim().length() == 0)&& sb.getConfig("useYacyReferer", "true").equals("true") ) { header.put(httpHeader.REFERER, (((System.currentTimeMillis() >> 10) & 1) == 0) ? "http://www.anomic.de" : diff --git a/yacy.init b/yacy.init index 75484fba0..be2fb9ee8 100644 --- a/yacy.init +++ b/yacy.init @@ -515,4 +515,6 @@ crawler.isPaused=false # maximum number of crawler threads crawler.MaxActiveThreads = 10 crawler.MaxIdleThreads = 7 -crawler.MinIdleThreads = 5 \ No newline at end of file +crawler.MinIdleThreads = 5 + +useYacyReferer = true