diff --git a/htroot/Connections_p.java b/htroot/Connections_p.java index f07419bb1..dc1f86866 100644 --- a/htroot/Connections_p.java +++ b/htroot/Connections_p.java @@ -53,12 +53,7 @@ public final class Connections_p { // return variable that accumulates replacements final Switchboard sb = (Switchboard) env; final serverObjects prop = new serverObjects(); - - - // get the virtualHost string - final String virtualHost = sb.getConfig("fileHost", "localhost"); - - + // server sessions // get the serverCore thread final WorkflowThread httpd = sb.getThread("10_httpd"); @@ -98,13 +93,7 @@ public final class Connections_p { continue; } - String dest = null; String prot = "http"; // only httpd sessions listed - - // What is the purpose of the following lines? Condition can never be true anyway. [MN wonders...] - if ((dest != null) && (dest.equals(virtualHost))) { - dest = sb.peers.mySeed().getName() + ".yacy"; - } // determining if the source is a yacy host yacySeed seed = null; @@ -134,7 +123,7 @@ public final class Connections_p { prop.putNum("list_" + idx + "_ms_duration", sessionTime); } prop.putHTML("list_" + idx + "_source",(seed!=null)?seed.getName()+".yacy":userAddress.getHostAddress()+":"+userPort); - prop.putHTML("list_" + idx + "_dest",(dest==null)?"-":dest); + prop.putHTML("list_" + idx + "_dest", "-"); if (blockingRequest) { prop.put("list_" + idx + "_running", "0"); prop.putNum("list_" + idx + "_running_reqNr", commandCount+1); diff --git a/htroot/yacysearch.java b/htroot/yacysearch.java index e98e7bd33..a85ec6fa2 100644 --- a/htroot/yacysearch.java +++ b/htroot/yacysearch.java @@ -30,7 +30,6 @@ import java.io.IOException; import java.util.HashMap; import java.util.Iterator; -import java.util.SortedMap; import java.util.SortedSet; import java.util.TreeSet; diff --git a/source/de/anomic/data/YMarkTables.java b/source/de/anomic/data/YMarkTables.java index c2faa4410..870312e74 100644 --- a/source/de/anomic/data/YMarkTables.java +++ b/source/de/anomic/data/YMarkTables.java @@ -413,7 +413,7 @@ public class YMarkTables { } } - public static EnumMap getMetadata(final byte[] urlHash, final Segment indexSegment) throws MalformedURLException { + public static EnumMap getMetadata(final byte[] urlHash, final Segment indexSegment) { final EnumMap metadata = new EnumMap(METADATA.class); final URIMetadataRow urlEntry = indexSegment.urlMetadata().load(urlHash, null, 0); if (urlEntry != null) { diff --git a/source/de/anomic/http/server/HTTPDProxyHandler.java b/source/de/anomic/http/server/HTTPDProxyHandler.java index 5505024c0..5057388ec 100644 --- a/source/de/anomic/http/server/HTTPDProxyHandler.java +++ b/source/de/anomic/http/server/HTTPDProxyHandler.java @@ -69,7 +69,6 @@ import java.util.logging.FileHandler; import java.util.logging.Level; import java.util.logging.LogManager; import java.util.logging.Logger; -import java.util.zip.GZIPOutputStream; import net.yacy.cora.document.MultiProtocolURI; import net.yacy.cora.protocol.Domains; @@ -445,10 +444,6 @@ public final class HTTPDProxyHandler { } private static void fulfillRequestFromWeb(final Properties conProp, final DigestURI url, final RequestHeader requestHeader, final ResponseHeader cachedResponseHeader, final OutputStream respond) { - - final GZIPOutputStream gzippedOut = null; - -// ResponseContainer res = null; try { final int reqID = requestHeader.hashCode(); @@ -547,7 +542,7 @@ public final class HTTPDProxyHandler { if (hasBody(client.getHttpResponse().getStatusLine().getStatusCode())) { - final OutputStream outStream = (gzippedOut != null) ? gzippedOut : ((chunkedOut != null)? chunkedOut : respond); + final OutputStream outStream = chunkedOut != null ? chunkedOut : respond; final Response response = new Response( request, requestHeader, @@ -626,9 +621,6 @@ public final class HTTPDProxyHandler { conProp.setProperty(HeaderFramework.CONNECTION_PROP_PROXY_RESPOND_CODE,"TCP_MISS"); } - if (gzippedOut != null) { - gzippedOut.finish(); - } if (chunkedOut != null) { chunkedOut.finish(); chunkedOut.flush(); @@ -683,9 +675,6 @@ public final class HTTPDProxyHandler { final String httpVer = conProp.getProperty(HeaderFramework.CONNECTION_PROP_HTTP_VER); - final ChunkedOutputStream chunkedOut = null; - final GZIPOutputStream gzippedOut = null; - // we respond on the request by using the cache, the cache is fresh try { prepareResponseHeader(cachedResponseHeader, httpVer); @@ -718,14 +707,9 @@ public final class HTTPDProxyHandler { HTTPDemon.sendRespondHeader(conProp,respond,httpVer,203,cachedResponseHeader); //respondHeader(respond, "203 OK", cachedResponseHeader); // respond with 'non-authoritative' - final OutputStream outStream = (gzippedOut != null) ? gzippedOut : ((chunkedOut != null)? chunkedOut : respond); - // send also the complete body now from the cache // simply read the file and transfer to out socket - FileUtils.copy(cacheEntry, outStream); - - if (gzippedOut != null) gzippedOut.finish(); - if (chunkedOut != null) chunkedOut.finish(); + FileUtils.copy(cacheEntry, respond); } // that's it! } catch (final Exception e) { diff --git a/source/de/anomic/yacy/dht/Transmission.java b/source/de/anomic/yacy/dht/Transmission.java index 172e5d84a..74b65be0d 100644 --- a/source/de/anomic/yacy/dht/Transmission.java +++ b/source/de/anomic/yacy/dht/Transmission.java @@ -45,7 +45,6 @@ import de.anomic.yacy.yacyClient; import de.anomic.yacy.yacySeed; import de.anomic.yacy.yacySeedDB; import java.util.List; -import java.util.Set; import java.util.SortedMap; public class Transmission { diff --git a/source/net/yacy/ai/example/ConnectFour.java b/source/net/yacy/ai/example/ConnectFour.java index 89ed96098..f56a9b7c5 100755 --- a/source/net/yacy/ai/example/ConnectFour.java +++ b/source/net/yacy/ai/example/ConnectFour.java @@ -278,7 +278,7 @@ public class ConnectFour { ContextFactory blueFactroy = new ContextFactory(new Strategy(), 50, false, false); strategies.put(Coin.red, redFactroy); strategies.put(Coin.blue, blueFactroy); - Battle battle = new Battle(new Board(Coin.red), strategies, 2000); + /*Battle battle =*/ new Battle(new Board(Coin.red), strategies, 2000); } public static void main(String[] args) { diff --git a/source/net/yacy/cora/protocol/http/HTTPConnector.java b/source/net/yacy/cora/protocol/http/HTTPConnector.java index 5f1e2f36a..316d31763 100644 --- a/source/net/yacy/cora/protocol/http/HTTPConnector.java +++ b/source/net/yacy/cora/protocol/http/HTTPConnector.java @@ -22,7 +22,6 @@ package net.yacy.cora.protocol.http; import java.io.IOException; -import java.util.LinkedHashMap; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap;