Skip to content

Commit

Permalink
do not Use YaCy-Sites as Referer, if useYacyReferer = false
Browse files Browse the repository at this point in the history
  • Loading branch information
allo committed Sep 2, 2005
1 parent f9eb550 commit 286442f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion source/de/anomic/http/httpc.java
Expand Up @@ -559,7 +559,8 @@ private void send(String method, String path, httpHeader header, boolean zipped)
}

// 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" :
Expand Down
4 changes: 3 additions & 1 deletion yacy.init
Expand Up @@ -515,4 +515,6 @@ crawler.isPaused=false
# maximum number of crawler threads
crawler.MaxActiveThreads = 10
crawler.MaxIdleThreads = 7
crawler.MinIdleThreads = 5
crawler.MinIdleThreads = 5

useYacyReferer = true

0 comments on commit 286442f

Please sign in to comment.