From 54a027233813720c9fe4ed610610743626a1a56c Mon Sep 17 00:00:00 2001 From: reger Date: Thu, 10 Oct 2013 23:23:58 +0200 Subject: [PATCH] searchpage javascript (latestinfo) causes reset of search statistic after moving to next page - disabled call via setTimeout in yacysearch.html --- htroot/yacysearch.html | 5 ++++- source/net/yacy/http/Jetty8YaCyDefaultServlet.java | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/htroot/yacysearch.html b/htroot/yacysearch.html index d187b37b6..a38b7ea57 100644 --- a/htroot/yacysearch.html +++ b/htroot/yacysearch.html @@ -246,9 +246,11 @@ function latestinfo() { var rsp = eval("(" + self.xmlHttpReq.responseText + ")"); statistics(rsp.offset, rsp.itemscount, rsp.itemsperpage, rsp.totalcount, rsp.localResourceSize, rsp.remoteResourceSize, rsp.remoteIndexCount, rsp.remotePeerCount, rsp.navurlBase); } - } + }; self.xmlHttpReq.send(null); } +// TODO: resets statistic on navigating to next page in Jetty implementation +/* window.setTimeout('latestinfo();',500); window.setTimeout('latestinfo();',1000); window.setTimeout('latestinfo();',1500); @@ -259,6 +261,7 @@ window.setTimeout('latestinfo();',5000); window.setTimeout('latestinfo();',6000); window.setTimeout('latestinfo();',8000); window.setTimeout('latestinfo();',10000); +*/ diff --git a/source/net/yacy/http/Jetty8YaCyDefaultServlet.java b/source/net/yacy/http/Jetty8YaCyDefaultServlet.java index b5a9c5041..4a3ebc5b7 100644 --- a/source/net/yacy/http/Jetty8YaCyDefaultServlet.java +++ b/source/net/yacy/http/Jetty8YaCyDefaultServlet.java @@ -447,6 +447,7 @@ public class Jetty8YaCyDefaultServlet extends YaCyDefaultServlet implements Reso } /* ------------------------------------------------------------ */ + @Override protected void sendData(HttpServletRequest request, HttpServletResponse response, boolean include,