From ae6d07bdb8ee974b0f2e29e586da91187c9789c6 Mon Sep 17 00:00:00 2001 From: low012 Date: Tue, 1 Jan 2008 23:03:02 +0000 Subject: [PATCH] *) "Did you mean:" will only be displayed if the list of suggested URLs is not empty. *) Removed
to make the "404 Unknown Host" error pag look like the other 404 error pages. git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@4298 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- htroot/proxymsg/unknownHost.inc | 3 ++- source/de/anomic/http/httpdProxyHandler.java | 9 ++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/htroot/proxymsg/unknownHost.inc b/htroot/proxymsg/unknownHost.inc index d77fbcf23..6322793ed 100644 --- a/htroot/proxymsg/unknownHost.inc +++ b/htroot/proxymsg/unknownHost.inc @@ -5,9 +5,10 @@ } --> -

The server #[hostName]# could not be found.

+ #(showList)#::

Did you mean:

+ #(/showList)# diff --git a/source/de/anomic/http/httpdProxyHandler.java b/source/de/anomic/http/httpdProxyHandler.java index 584d09c8e..b0e31f50d 100644 --- a/source/de/anomic/http/httpdProxyHandler.java +++ b/source/de/anomic/http/httpdProxyHandler.java @@ -1492,7 +1492,14 @@ public final class httpdProxyHandler { hostNameCount++; } - detailedErrorMsgMap.put("list", hostNameCount); + detailedErrorMsgMap.put("list", hostNameCount); + + if (hostNameCount != 0) { + detailedErrorMsgMap.put("showList", 1); + } else { + detailedErrorMsgMap.put("showList", 0); + } + return detailedErrorMsgMap; }