mirror of
https://github.com/yacy/yacy_search_server.git
synced 2024-09-19 00:01:41 +02:00
*) fixed static ip beeing cleared when no port was given
*) fixed static ip beeing enabled although it was cleaned to "" git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3198 6c8d7289-2bf4-0310-a012-ef5d649a1542
This commit is contained in:
parent
4dce5ec261
commit
6ac0021e14
|
@ -294,19 +294,17 @@ public class SettingsAck_p {
|
|||
|
||||
// static IP
|
||||
String staticIP = ((String) post.get("staticIP")).trim();
|
||||
if (staticIP.startsWith("http://")) {
|
||||
if (staticIP.length() > 7) { staticIP = staticIP.substring(7); } else { staticIP = ""; }
|
||||
} else if (staticIP.startsWith("https://")) {
|
||||
if (staticIP.length() > 8) { staticIP = staticIP.substring(8); } else { staticIP = ""; }
|
||||
}
|
||||
if (staticIP.indexOf(":") > 0) {
|
||||
staticIP = staticIP.substring(0, staticIP.indexOf(":"));
|
||||
}
|
||||
if (staticIP.length() == 0) {
|
||||
serverCore.useStaticIP = false;
|
||||
} else {
|
||||
if (staticIP.startsWith("http://")) {
|
||||
if (staticIP.length() > 7) { staticIP = staticIP.substring(7); } else { staticIP = ""; }
|
||||
} else if (staticIP.startsWith("https://")) {
|
||||
if (staticIP.length() > 8) { staticIP = staticIP.substring(8); } else { staticIP = ""; }
|
||||
}
|
||||
if (staticIP.indexOf(":") > 0) {
|
||||
staticIP = staticIP.substring(0, staticIP.indexOf(":"));
|
||||
} else {
|
||||
staticIP = "";
|
||||
}
|
||||
serverCore.useStaticIP = true;
|
||||
}
|
||||
yacyCore.seedDB.mySeed.put(yacySeed.IP, staticIP);
|
||||
|
|
Loading…
Reference in New Issue
Block a user