Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
list entries in outgoing cookie monitor one per line for easier readability. For this adjust outgoingCookies entry to use Cookie[] instead of String[]
regerb32bcdf34408
diff --git a/htroot/CookieMonitorOutgoing_p.html b/htroot/CookieMonitorOutgoing_p.htmlindex d5dba4edb..ebcd5576f 100644--- a/htroot/CookieMonitorOutgoing_p.html+++ b/htroot/CookieMonitorOutgoing_p.html@@ -12,8 +12,8 @@<p>Showing #[num]# entries from a total of #[total]# Cookies.</p><table border="0"><colgroup>- <col width="10" span="3" />- <col width="70" />+ <col width="10%" span="3" />+ <col width="70%" /></colgroup><tr class="TableHeader"><td>Receiving Host</td>diff --git a/htroot/CookieMonitorOutgoing_p.java b/htroot/CookieMonitorOutgoing_p.javaindex 274d708cf..23f77e217 100644--- a/htroot/CookieMonitorOutgoing_p.java+++ b/htroot/CookieMonitorOutgoing_p.java@@ -30,6 +30,7 @@import java.util.Date;import java.util.Iterator;import java.util.Map;+import javax.servlet.http.Cookie;import net.yacy.cora.protocol.HeaderFramework;import net.yacy.cora.protocol.RequestHeader;@@ -65,17 +66,17 @@ public class CookieMonitorOutgoing_p {final Iterator<Map.Entry<String, Object[]>> i = switchboard.outgoingCookies.entrySet().iterator();Map.Entry<String, Object[]> entry;String host, client;- Object[] cookies;+ Cookie[] cookies;Date date;Object[] oa;while ((entCount < maxCount) && (i.hasNext())) {// get out valuesentry = i.next();host = entry.getKey();- oa = entry.getValue();+ oa = entry.getValue(); // entry structure -> { date, client, Cookie[] }date = (Date) oa[0];client = (String) oa[1];- cookies = (Object[]) oa[2];+ cookies = (Cookie[]) oa[2];// put values in templateprop.put("list_" + entCount + "_dark", dark ? "1" : "0" );@@ -84,7 +85,7 @@ public class CookieMonitorOutgoing_p {prop.put("list_" + entCount + "_date", HeaderFramework.formatRFC1123(date));prop.put("list_" + entCount + "_client", client);while (tmpCount < cookies.length){- prop.putHTML("list_" + entCount + "_cookies_" + tmpCount + "_item", ((String) cookies[tmpCount]));+ prop.putHTML("list_" + entCount + "_cookies_" + tmpCount + "_item", cookies[tmpCount].getName() + "=" + cookies[tmpCount].getValue());tmpCount++;}prop.put("list_" + entCount + "_cookies", tmpCount);diff --git a/source/net/yacy/server/http/HTTPDProxyHandler.java b/source/net/yacy/server/http/HTTPDProxyHandler.javaindex ff28602a5..10d3b931b 100644--- a/source/net/yacy/server/http/HTTPDProxyHandler.java+++ b/source/net/yacy/server/http/HTTPDProxyHandler.java@@ -221,7 +221,7 @@ public final class HTTPDProxyHandler {*/if (sb.getConfigBool("proxy.monitorCookies", false)) {if (requestHeader.containsKey(RequestHeader.COOKIE)) {- final Object[] entry = new Object[]{new Date(), clienthost, requestHeader.getMultiple(RequestHeader.COOKIE)};+ final Object[] entry = new Object[]{new Date(), clienthost, requestHeader.getCookies()};synchronized(sb.outgoingCookies) {sb.outgoingCookies.put(targethost, entry);}