*) fix for commit 4212

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@4217 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
low012 17 years ago
parent 3491531cea
commit 383dc815d2

@ -1,7 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<base href="http://#[host]#:#[port]#" /> <base href="http://#[extAddress]#" />
<title>YaCy: Error Message</title> <title>YaCy: Error Message</title>
#%env/templates/metas.template%# #%env/templates/metas.template%#
</head> </head>

@ -1164,6 +1164,15 @@ public final class httpd implements serverHandler {
: Integer.toString(serverCore.getPortNr(switchboard.getConfig("port", "8080")))); : Integer.toString(serverCore.getPortNr(switchboard.getConfig("port", "8080"))));
} }
// if peer has public address it will be used
if (yacyCore.seedDB.mySeed().getPublicAddress() != null) {
tp.put("extAddress", yacyCore.seedDB.mySeed().getPublicAddress());
}
// otherwise the local ip address will be used
else {
tp.put("extAddress", tp.get("host", "127.0.0.1") + ":" + tp.get("port", "8080"));
}
tp.put("peerName", yacyCore.seedDB.mySeed().getName()); tp.put("peerName", yacyCore.seedDB.mySeed().getName());
tp.put("errorMessageType", errorcase); tp.put("errorMessageType", errorcase);
tp.put("httpStatus", Integer.toString(httpStatusCode) + " " + httpStatusText); tp.put("httpStatus", Integer.toString(httpStatusCode) + " " + httpStatusText);

Loading…
Cancel
Save