From b08af0c2cb1061e5dd5e9d919b35a87f0b61940f Mon Sep 17 00:00:00 2001 From: hermens Date: Wed, 25 Jan 2006 13:25:48 +0000 Subject: [PATCH] *) Force download of seed file when checking upload success git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1441 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- source/de/anomic/http/httpc.java | 2 +- source/de/anomic/yacy/yacySeedDB.java | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/source/de/anomic/http/httpc.java b/source/de/anomic/http/httpc.java index b7699eec9..248e8a642 100644 --- a/source/de/anomic/http/httpc.java +++ b/source/de/anomic/http/httpc.java @@ -1078,7 +1078,7 @@ do upload con = httpc.getInstance(host, port, timeout, ssl, theRemoteProxyConfig); } - httpc.response res = con.GET(path, null); + httpc.response res = con.GET(path, requestHeader); if (res.status.startsWith("2")) { return res.writeContent(); } diff --git a/source/de/anomic/yacy/yacySeedDB.java b/source/de/anomic/yacy/yacySeedDB.java index cf0cbcc6a..aa3c7117b 100644 --- a/source/de/anomic/yacy/yacySeedDB.java +++ b/source/de/anomic/yacy/yacySeedDB.java @@ -687,12 +687,17 @@ public final class yacySeedDB { private boolean checkCache(ArrayList uv, URL seedURL) throws IOException { // check if the result can be retrieved again // TODO: should we check the useProxy4Yacy option here??? + httpHeader reqHeader = new httpHeader(); + reqHeader.put(httpHeader.PRAGMA, "no-cache"); + reqHeader.put(httpHeader.CACHE_CONTROL, "no-cache"); // httpc uses HTTP/1.0 is this necessa +ry? ArrayList check = httpc.wget( seedURL, 10000, null, null, - sb.remoteProxyConfig + sb.remoteProxyConfig, + reqHeader ); if (check == null) { @@ -815,4 +820,4 @@ public final class yacySeedDB { } -} \ No newline at end of file +}