Skip to content

Commit

Permalink
*) Force download of seed file when checking upload success
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1441 6c8d7289-2bf4-0310-a012-ef5d649a1542
  • Loading branch information
hermens committed Jan 25, 2006
1 parent 66c8891 commit b08af0c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion source/de/anomic/http/httpc.java
Expand Up @@ -1078,7 +1078,7 @@ public static byte[] singleGET(
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();
}
Expand Down
9 changes: 7 additions & 2 deletions source/de/anomic/yacy/yacySeedDB.java
Expand Up @@ -687,12 +687,17 @@ public String copyCache(File seedFile, URL seedURL) throws IOException {
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) {
Expand Down Expand Up @@ -815,4 +820,4 @@ public Object nextElement() {

}

}
}

0 comments on commit b08af0c

Please sign in to comment.