|
|
|
@ -102,8 +102,8 @@ public final class yacyClient {
|
|
|
|
|
// generate request
|
|
|
|
|
final serverObjects obj = new serverObjects();
|
|
|
|
|
salt = yacyNetwork.enrichRequestPost(obj, plasmaSwitchboard.getSwitchboard(), null);
|
|
|
|
|
obj.put("count", "20");
|
|
|
|
|
obj.put("seed", yacyCore.seedDB.mySeed.genSeedStr(salt));
|
|
|
|
|
obj.putASIS("count", "20");
|
|
|
|
|
obj.putASIS("seed", yacyCore.seedDB.mySeed.genSeedStr(salt));
|
|
|
|
|
|
|
|
|
|
// send request
|
|
|
|
|
result = nxTools.table(
|
|
|
|
@ -237,8 +237,8 @@ public final class yacyClient {
|
|
|
|
|
// prepare request
|
|
|
|
|
final serverObjects post = new serverObjects();
|
|
|
|
|
String salt = yacyNetwork.enrichRequestPost(post, plasmaSwitchboard.getSwitchboard(), target.hash);
|
|
|
|
|
post.put("object", "seed");
|
|
|
|
|
post.put("env", seedHash);
|
|
|
|
|
post.putASIS("object", "seed");
|
|
|
|
|
post.putASIS("env", seedHash);
|
|
|
|
|
|
|
|
|
|
// send request
|
|
|
|
|
try {
|
|
|
|
@ -267,9 +267,9 @@ public final class yacyClient {
|
|
|
|
|
// prepare request
|
|
|
|
|
final serverObjects post = new serverObjects();
|
|
|
|
|
yacyNetwork.enrichRequestPost(post, plasmaSwitchboard.getSwitchboard(), target.hash);
|
|
|
|
|
post.put("object", "rwicount");
|
|
|
|
|
post.put("ttl", "0");
|
|
|
|
|
post.put("env", wordHash);
|
|
|
|
|
post.putASIS("object", "rwicount");
|
|
|
|
|
post.putASIS("ttl", "0");
|
|
|
|
|
post.putASIS("env", wordHash);
|
|
|
|
|
|
|
|
|
|
// send request
|
|
|
|
|
try {
|
|
|
|
@ -300,9 +300,9 @@ public final class yacyClient {
|
|
|
|
|
// prepare request
|
|
|
|
|
final serverObjects post = new serverObjects();
|
|
|
|
|
yacyNetwork.enrichRequestPost(post, plasmaSwitchboard.getSwitchboard(), target.hash);
|
|
|
|
|
post.put("object", "lurlcount");
|
|
|
|
|
post.put("ttl", "0");
|
|
|
|
|
post.put("env", "");
|
|
|
|
|
post.putASIS("object", "lurlcount");
|
|
|
|
|
post.putASIS("ttl", "0");
|
|
|
|
|
post.putASIS("env", "");
|
|
|
|
|
|
|
|
|
|
// send request
|
|
|
|
|
try {
|
|
|
|
@ -373,22 +373,22 @@ public final class yacyClient {
|
|
|
|
|
final serverObjects post = new serverObjects();
|
|
|
|
|
final String salt = yacyNetwork.enrichRequestPost(post, plasmaSwitchboard.getSwitchboard(), target.hash);
|
|
|
|
|
long duetime = timingProfile.duetime();
|
|
|
|
|
post.put("myseed", yacyCore.seedDB.mySeed.genSeedStr(salt));
|
|
|
|
|
post.putASIS("myseed", yacyCore.seedDB.mySeed.genSeedStr(salt));
|
|
|
|
|
post.put("count", timingProfile.getTargetCount(plasmaSearchTimingProfile.PROCESS_POSTSORT));
|
|
|
|
|
post.put("resource", ((global) ? "global" : "local"));
|
|
|
|
|
post.putASIS("resource", ((global) ? "global" : "local"));
|
|
|
|
|
post.put("partitions", partitions);
|
|
|
|
|
post.put("query", wordhashes);
|
|
|
|
|
post.put("exclude", excludehashes);
|
|
|
|
|
post.put("urls", urlhashes);
|
|
|
|
|
post.put("prefer", prefer);
|
|
|
|
|
post.put("filter", filter);
|
|
|
|
|
post.put("ttl", "0");
|
|
|
|
|
post.putASIS("query", wordhashes);
|
|
|
|
|
post.putASIS("exclude", excludehashes);
|
|
|
|
|
post.putASIS("urls", urlhashes);
|
|
|
|
|
post.putASIS("prefer", prefer);
|
|
|
|
|
post.putASIS("filter", filter);
|
|
|
|
|
post.putASIS("ttl", "0");
|
|
|
|
|
post.put("duetime", Long.toString(duetime));
|
|
|
|
|
post.put("timing", crypt.simpleEncode(timingProfile.targetToString())); // new duetimes splitted by specific search tasks
|
|
|
|
|
post.putASIS("timing", crypt.simpleEncode(timingProfile.targetToString())); // new duetimes splitted by specific search tasks
|
|
|
|
|
post.put("maxdist", maxDistance);
|
|
|
|
|
post.put("profile", crypt.simpleEncode(rankingProfile.toExternalString()));
|
|
|
|
|
post.put("constraint", constraint.exportB64());
|
|
|
|
|
if (abstractCache != null) post.put("abstracts", "auto");
|
|
|
|
|
post.putASIS("profile", crypt.simpleEncode(rankingProfile.toExternalString()));
|
|
|
|
|
post.putASIS("constraint", constraint.exportB64());
|
|
|
|
|
if (abstractCache != null) post.putASIS("abstracts", "auto");
|
|
|
|
|
final long timestamp = System.currentTimeMillis();
|
|
|
|
|
|
|
|
|
|
// send request
|
|
|
|
@ -570,7 +570,7 @@ public final class yacyClient {
|
|
|
|
|
// prepare request
|
|
|
|
|
final serverObjects post = new serverObjects();
|
|
|
|
|
yacyNetwork.enrichRequestPost(post, plasmaSwitchboard.getSwitchboard(), targetHash);
|
|
|
|
|
post.put("process", "permission");
|
|
|
|
|
post.putASIS("process", "permission");
|
|
|
|
|
|
|
|
|
|
// send request
|
|
|
|
|
try {
|
|
|
|
@ -599,9 +599,9 @@ public final class yacyClient {
|
|
|
|
|
// prepare request
|
|
|
|
|
final serverObjects post = new serverObjects();
|
|
|
|
|
final String salt = yacyNetwork.enrichRequestPost(post, plasmaSwitchboard.getSwitchboard(), targetHash);
|
|
|
|
|
post.put("process", "post");
|
|
|
|
|
post.put("myseed", yacyCore.seedDB.mySeed.genSeedStr(salt));
|
|
|
|
|
post.put("subject", subject);
|
|
|
|
|
post.putASIS("process", "post");
|
|
|
|
|
post.putASIS("myseed", yacyCore.seedDB.mySeed.genSeedStr(salt));
|
|
|
|
|
post.putASIS("subject", subject);
|
|
|
|
|
try {
|
|
|
|
|
post.put("message", new String(message, "UTF-8"));
|
|
|
|
|
} catch (UnsupportedEncodingException e) {
|
|
|
|
@ -647,11 +647,11 @@ public final class yacyClient {
|
|
|
|
|
// prepare request
|
|
|
|
|
final serverObjects post = new serverObjects();
|
|
|
|
|
yacyNetwork.enrichRequestPost(post, plasmaSwitchboard.getSwitchboard(), null);
|
|
|
|
|
post.put("process", "permission");
|
|
|
|
|
post.put("purpose", "crcon");
|
|
|
|
|
post.put("filename", filename);
|
|
|
|
|
post.put("filesize", Long.toString(filesize));
|
|
|
|
|
post.put("can-send-protocol", "http");
|
|
|
|
|
post.putASIS("process", "permission");
|
|
|
|
|
post.putASIS("purpose", "crcon");
|
|
|
|
|
post.putASIS("filename", filename);
|
|
|
|
|
post.putASIS("filesize", Long.toString(filesize));
|
|
|
|
|
post.putASIS("can-send-protocol", "http");
|
|
|
|
|
|
|
|
|
|
// send request
|
|
|
|
|
try {
|
|
|
|
@ -680,12 +680,12 @@ public final class yacyClient {
|
|
|
|
|
// prepare request
|
|
|
|
|
final serverObjects post = new serverObjects();
|
|
|
|
|
yacyNetwork.enrichRequestPost(post, plasmaSwitchboard.getSwitchboard(), null);
|
|
|
|
|
post.put("process", "store");
|
|
|
|
|
post.put("purpose", "crcon");
|
|
|
|
|
post.put("filename", filename);
|
|
|
|
|
post.putASIS("process", "store");
|
|
|
|
|
post.putASIS("purpose", "crcon");
|
|
|
|
|
post.putASIS("filename", filename);
|
|
|
|
|
post.put("filesize", Long.toString(file.length));
|
|
|
|
|
post.put("md5", serverCodings.encodeMD5Hex(file));
|
|
|
|
|
post.put("access", access);
|
|
|
|
|
post.putASIS("md5", serverCodings.encodeMD5Hex(file));
|
|
|
|
|
post.putASIS("access", access);
|
|
|
|
|
HashMap files = new HashMap();
|
|
|
|
|
files.put("filename", file);
|
|
|
|
|
|
|
|
|
@ -747,18 +747,18 @@ public final class yacyClient {
|
|
|
|
|
// prepare request
|
|
|
|
|
final serverObjects post = new serverObjects();
|
|
|
|
|
yacyNetwork.enrichRequestPost(post, plasmaSwitchboard.getSwitchboard(), target.hash);
|
|
|
|
|
post.put("process", "crawl");
|
|
|
|
|
post.putASIS("process", "crawl");
|
|
|
|
|
if (url.length == 1) {
|
|
|
|
|
post.put("url", crypt.simpleEncode(url[0].toNormalform(true, true)));
|
|
|
|
|
post.put("referrer", crypt.simpleEncode((referrer[0] == null) ? "" : referrer[0].toNormalform(true, true)));
|
|
|
|
|
post.putASIS("url", crypt.simpleEncode(url[0].toNormalform(true, true)));
|
|
|
|
|
post.putASIS("referrer", crypt.simpleEncode((referrer[0] == null) ? "" : referrer[0].toNormalform(true, true)));
|
|
|
|
|
} else {
|
|
|
|
|
for (int i=0; i< url.length; i++) {
|
|
|
|
|
post.put("url" + i, crypt.simpleEncode(url[i].toNormalform(true, true)));
|
|
|
|
|
post.put("ref" + i, crypt.simpleEncode((referrer[i] == null) ? "" : referrer[i].toNormalform(true, true)));
|
|
|
|
|
post.putASIS("url" + i, crypt.simpleEncode(url[i].toNormalform(true, true)));
|
|
|
|
|
post.putASIS("ref" + i, crypt.simpleEncode((referrer[i] == null) ? "" : referrer[i].toNormalform(true, true)));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
post.put("depth", "0");
|
|
|
|
|
post.put("ttl", "0");
|
|
|
|
|
post.putASIS("depth", "0");
|
|
|
|
|
post.putASIS("ttl", "0");
|
|
|
|
|
|
|
|
|
|
// determining target address
|
|
|
|
|
final String address = target.getClusterAddress();
|
|
|
|
@ -820,12 +820,12 @@ public final class yacyClient {
|
|
|
|
|
// prepare request
|
|
|
|
|
final serverObjects post = new serverObjects();
|
|
|
|
|
String salt = yacyNetwork.enrichRequestPost(post, plasmaSwitchboard.getSwitchboard(), target.hash);
|
|
|
|
|
post.put("process", process);
|
|
|
|
|
post.put("urlhash", ((entry == null) ? "" : entry.hash()));
|
|
|
|
|
post.put("result", result);
|
|
|
|
|
post.put("reason", reason);
|
|
|
|
|
post.put("wordh", wordhashes);
|
|
|
|
|
post.put("lurlEntry", ((entry == null) ? "" : crypt.simpleEncode(entry.toString(), salt)));
|
|
|
|
|
post.putASIS("process", process);
|
|
|
|
|
post.putASIS("urlhash", ((entry == null) ? "" : entry.hash()));
|
|
|
|
|
post.putASIS("result", result);
|
|
|
|
|
post.putASIS("reason", reason);
|
|
|
|
|
post.putASIS("wordh", wordhashes);
|
|
|
|
|
post.putASIS("lurlEntry", ((entry == null) ? "" : crypt.simpleEncode(entry.toString(), salt)));
|
|
|
|
|
|
|
|
|
|
// determining target address
|
|
|
|
|
final String address = target.getClusterAddress();
|
|
|
|
@ -951,7 +951,7 @@ public final class yacyClient {
|
|
|
|
|
|
|
|
|
|
// enabling gzip compression for post request body
|
|
|
|
|
if ((gzipBody) && (targetSeed.getVersion() >= yacyVersion.YACY_SUPPORTS_GZIP_POST_REQUESTS)) {
|
|
|
|
|
post.put(httpc.GZIP_POST_BODY,"true");
|
|
|
|
|
post.putASIS(httpc.GZIP_POST_BODY,"true");
|
|
|
|
|
}
|
|
|
|
|
post.put("wordc", Integer.toString(indexes.length));
|
|
|
|
|
|
|
|
|
@ -978,8 +978,8 @@ public final class yacyClient {
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
post.put("entryc", Integer.toString(indexcount));
|
|
|
|
|
post.put("indexes", entrypost.toString());
|
|
|
|
|
post.put("entryc", indexcount);
|
|
|
|
|
post.putASIS("indexes", entrypost.toString());
|
|
|
|
|
try {
|
|
|
|
|
final ArrayList v = nxTools.strings(
|
|
|
|
|
httpc.wput(
|
|
|
|
@ -1018,7 +1018,7 @@ public final class yacyClient {
|
|
|
|
|
|
|
|
|
|
// enabling gzip compression for post request body
|
|
|
|
|
if ((gzipBody) && (targetSeed.getVersion() >= yacyVersion.YACY_SUPPORTS_GZIP_POST_REQUESTS)) {
|
|
|
|
|
post.put(httpc.GZIP_POST_BODY,"true");
|
|
|
|
|
post.putASIS(httpc.GZIP_POST_BODY,"true");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
String resource = "";
|
|
|
|
@ -1028,13 +1028,13 @@ public final class yacyClient {
|
|
|
|
|
if (urls[i] != null) {
|
|
|
|
|
resource = urls[i].toString();
|
|
|
|
|
if (resource != null) {
|
|
|
|
|
post.put("url" + urlc, resource);
|
|
|
|
|
post.putASIS("url" + urlc, resource);
|
|
|
|
|
urlPayloadSize += resource.length();
|
|
|
|
|
urlc++;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
post.put("urlc", Integer.toString(urlc));
|
|
|
|
|
post.put("urlc", urlc);
|
|
|
|
|
try {
|
|
|
|
|
final ArrayList v = nxTools.strings(
|
|
|
|
|
httpc.wput(
|
|
|
|
|