diff --git a/source/de/anomic/http/httpd.java b/source/de/anomic/http/httpd.java index 3c3f76057..927d4513f 100644 --- a/source/de/anomic/http/httpd.java +++ b/source/de/anomic/http/httpd.java @@ -1084,7 +1084,7 @@ public final class httpd implements serverHandler { switch (errorcase) { case 4: - tp.put("errorMessageType_detailedErrorMsg",(detailedErrorMsgText==null)?"":detailedErrorMsgText); + tp.put("errorMessageType_detailedErrorMsg",(detailedErrorMsgText==null)?"":detailedErrorMsgText.replaceAll("\n","
")); break; case 5: tp.put("errorMessageType_file",(detailedErrorMsgFile==null)?"":detailedErrorMsgFile); diff --git a/source/de/anomic/http/httpdProxyHandler.java b/source/de/anomic/http/httpdProxyHandler.java index 97f942172..7982f61c5 100644 --- a/source/de/anomic/http/httpdProxyHandler.java +++ b/source/de/anomic/http/httpdProxyHandler.java @@ -74,6 +74,7 @@ import java.net.ConnectException; import java.net.MalformedURLException; import java.net.NoRouteToHostException; import java.net.Socket; +import java.net.SocketTimeoutException; import java.net.URL; import java.net.UnknownHostException; import java.util.Date; @@ -1295,7 +1296,9 @@ public final class httpdProxyHandler extends httpdAbstractHandler implements htt } else if (e instanceof NoRouteToHostException) { errorMessage = "No route to destination host"; } else if (e instanceof UnknownHostException) { - errorMessage = "IP address of the destination host could not be determined"; + errorMessage = "IP address of the destination host could not be determined"; + } else if (e instanceof SocketTimeoutException) { + errorMessage = "Unable to establish a connection to the destination host. Connect timed out."; } else { String exceptionMsg = e.getMessage(); if ((exceptionMsg != null) && (exceptionMsg.indexOf("Corrupt GZIP trailer") >= 0)) { diff --git a/yacy.init b/yacy.init index 75a3c0bfc..0a4c7c0b7 100644 --- a/yacy.init +++ b/yacy.init @@ -19,7 +19,7 @@ port = 8080 # since this applies only to the client-proxy connection, # it can be rather short # milliseconds -clientTimeout = 8000 +clientTimeout = 30000 # maximal number of httpd sessions # a client may open several connections at one, and the httpdMaxActiveSessions value sets