mirror of
https://github.com/yacy/yacy_search_server.git
synced 2024-09-19 00:01:41 +02:00
applied UTF-8 encoding parameter to yacy-internal protocol communication
git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@2694 6c8d7289-2bf4-0310-a012-ef5d649a1542
This commit is contained in:
parent
c40fca08a2
commit
bcf2b800b4
|
@ -98,7 +98,7 @@ public class ConfigLanguage_p {
|
|||
ArrayList langVector;
|
||||
try{
|
||||
URL u = new URL(url);
|
||||
langVector = nxTools.strings(httpc.wget(u, u.getHost(), 6000, null, null, switchboard.remoteProxyConfig));
|
||||
langVector = nxTools.strings(httpc.wget(u, u.getHost(), 6000, null, null, switchboard.remoteProxyConfig), "UTF-8");
|
||||
}catch(IOException e){
|
||||
prop.put("status", 1);//unable to get url
|
||||
prop.put("status_url", url);
|
||||
|
|
|
@ -127,7 +127,7 @@ public class ConfigSkins_p {
|
|||
ArrayList skinVector;
|
||||
try{
|
||||
URL u = new URL(url);
|
||||
skinVector = nxTools.strings(httpc.wget(u, u.getHost(), 6000, null, null, switchboard.remoteProxyConfig));
|
||||
skinVector = nxTools.strings(httpc.wget(u, u.getHost(), 6000, null, null, switchboard.remoteProxyConfig), "UTF-8");
|
||||
}catch(IOException e){
|
||||
prop.put("status", 1);//unable to get URL
|
||||
prop.put("status_url", url);
|
||||
|
|
|
@ -131,7 +131,7 @@ public class sharedBlacklist_p {
|
|||
|
||||
// get List
|
||||
URL u = new URL(downloadURL);
|
||||
otherBlacklist = nxTools.strings(httpc.wget(u, u.getHost(), 12000, null, null, switchboard.remoteProxyConfig,reqHeader));
|
||||
otherBlacklist = nxTools.strings(httpc.wget(u, u.getHost(), 12000, null, null, switchboard.remoteProxyConfig,reqHeader), "UTF-8");
|
||||
} catch (Exception e) {
|
||||
prop.put("status", STATUS_PEER_UNKNOWN);
|
||||
prop.put("page", 1);
|
||||
|
@ -147,7 +147,7 @@ public class sharedBlacklist_p {
|
|||
|
||||
try {
|
||||
URL u = new URL(downloadURL);
|
||||
otherBlacklist = nxTools.strings(httpc.wget(u, u.getHost(), 6000, null, null, switchboard.remoteProxyConfig)); //get List
|
||||
otherBlacklist = nxTools.strings(httpc.wget(u, u.getHost(), 6000, null, null, switchboard.remoteProxyConfig), "UTF-8"); //get List
|
||||
} catch (Exception e) {
|
||||
prop.put("status", STATUS_URL_PROBLEM);
|
||||
prop.put("status_address",downloadURL);
|
||||
|
|
|
@ -97,7 +97,7 @@ public class natLib {
|
|||
|
||||
private static String getIPID() {
|
||||
try {
|
||||
ArrayList x = nxTools.strings(httpc.wget(new URL("http://ipid.shat.net/"), "ipid.shat.net", 5000, null, null, null));
|
||||
ArrayList x = nxTools.strings(httpc.wget(new URL("http://ipid.shat.net/"), "ipid.shat.net", 5000, null, null, null), "UTF-8");
|
||||
x = nxTools.grep(x, 2, "Your IP address");
|
||||
String line = nxTools.tail1(x);
|
||||
return nxTools.awk(nxTools.awk(nxTools.awk(line, " ", 5), ">", 2), "<", 1);
|
||||
|
|
|
@ -67,8 +67,8 @@ public class nxTools {
|
|||
return props;
|
||||
}
|
||||
|
||||
public static HashMap table(byte[] a) {
|
||||
return table(strings(a));
|
||||
public static HashMap table(byte[] a, String encoding) {
|
||||
return table(strings(a, encoding));
|
||||
}
|
||||
|
||||
public static HashMap table(ArrayList list) {
|
||||
|
|
|
@ -269,7 +269,7 @@ public final class yacyClient {
|
|||
(useProxy)?yacyCore.seedDB.sb.remoteProxyConfig:null,
|
||||
null
|
||||
)
|
||||
);
|
||||
, "UTF-8");
|
||||
|
||||
if (result == null || result.size() == 0) { return null; }
|
||||
//final Date remoteTime = yacyCore.parseUniversalDate((String) result.get(yacySeed.MYTIME)); // read remote time
|
||||
|
@ -305,7 +305,7 @@ public final class yacyClient {
|
|||
null,
|
||||
(useProxy)?yacyCore.seedDB.sb.remoteProxyConfig:null
|
||||
)
|
||||
);
|
||||
, "UTF-8");
|
||||
|
||||
if (result == null || result.size() == 0) { return -1; }
|
||||
return Integer.parseInt((String) result.get("response"));
|
||||
|
@ -346,7 +346,7 @@ public final class yacyClient {
|
|||
null,
|
||||
(useProxy)?yacyCore.seedDB.sb.remoteProxyConfig:null
|
||||
)
|
||||
);
|
||||
, "UTF-8");
|
||||
|
||||
// yacyCore.log("DEBUG QUERY: query=" + querystr + "; result = " + result.toString());
|
||||
if ((result == null) || (result.size() == 0)) return -1;
|
||||
|
@ -917,7 +917,7 @@ public final class yacyClient {
|
|||
null,
|
||||
(useProxy)?yacyCore.seedDB.sb.remoteProxyConfig:null
|
||||
)
|
||||
);
|
||||
, "UTF-8");
|
||||
} catch (Exception e) {
|
||||
// most probably a network time-out exception
|
||||
yacyCore.log.logSevere("yacyClient.crawlReceipt error:" + e.getMessage());
|
||||
|
@ -1213,7 +1213,7 @@ public final class yacyClient {
|
|||
null,
|
||||
(useProxy)?yacyCore.seedDB.sb.remoteProxyConfig:null
|
||||
)
|
||||
);
|
||||
, "UTF-8");
|
||||
System.out.println("Result=" + result.toString());
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
|
|
|
@ -201,7 +201,7 @@ public class yacyPeerActions {
|
|||
yacyCore.log.logInfo("BOOTSTRAP: seed-list URL " + seedListFileURL + " too old (" + (header.age() / 86400000) + " days)");
|
||||
} else {
|
||||
ssc++;
|
||||
seedList = nxTools.strings(httpc.wget(url, url.getHost(), this.bootstrapLoadTimeout, null, null, this.sb.remoteProxyConfig,reqHeader));
|
||||
seedList = nxTools.strings(httpc.wget(url, url.getHost(), this.bootstrapLoadTimeout, null, null, this.sb.remoteProxyConfig,reqHeader), "UTF-8");
|
||||
enu = seedList.iterator();
|
||||
lc = 0;
|
||||
while (enu.hasNext()) {
|
||||
|
@ -255,7 +255,7 @@ public class yacyPeerActions {
|
|||
// read in remote file from url
|
||||
try {
|
||||
URL u = new URL(url);
|
||||
ArrayList remote = nxTools.strings(httpc.wget(u, u.getHost(), 5000, null, null, this.sb.remoteProxyConfig));
|
||||
ArrayList remote = nxTools.strings(httpc.wget(u, u.getHost(), 5000, null, null, this.sb.remoteProxyConfig), "UTF-8");
|
||||
if ((remote != null) && (remote.size() > 0)) {
|
||||
Iterator e = remote.iterator();
|
||||
while (e.hasNext()) {
|
||||
|
|
|
@ -722,7 +722,7 @@ public final class yacySeedDB {
|
|||
null,
|
||||
sb.remoteProxyConfig,
|
||||
reqHeader
|
||||
));
|
||||
), "UTF-8");
|
||||
|
||||
if (check == null) {
|
||||
serverLog.logFine("YACY","SaveSeedList: Testing download failed ...");
|
||||
|
|
Loading…
Reference in New Issue
Block a user