diff --git a/source/de/anomic/crawler/CrawlStacker.java b/source/de/anomic/crawler/CrawlStacker.java index b6bef6f63..6395b56fe 100644 --- a/source/de/anomic/crawler/CrawlStacker.java +++ b/source/de/anomic/crawler/CrawlStacker.java @@ -211,21 +211,21 @@ public final class CrawlStacker { ) /* qualified */; if (!local && !global && !remote && !proxy) { - error = "URL '" + entry.url().toString() + "' cannot be crawled. initiator = " + new String(entry.initiator()) + ", profile.handle = " + profile.handle(); + error = "URL '" + entry.url().toString() + "' cannot be crawled. initiator = " + ((entry.initiator() == null) ? "" : new String(entry.initiator())) + ", profile.handle = " + profile.handle(); this.log.logSevere(error); return error; } if (global) { // it may be possible that global == true and local == true, so do not check an error case against it - if (proxy) this.log.logWarning("URL '" + entry.url().toString() + "' has conflicting initiator properties: global = true, proxy = true, initiator = " + new String(entry.initiator()) + ", profile.handle = " + profile.handle()); + if (proxy) this.log.logWarning("URL '" + entry.url().toString() + "' has conflicting initiator properties: global = true, proxy = true, initiator = proxy" + ", profile.handle = " + profile.handle()); if (remote) this.log.logWarning("URL '" + entry.url().toString() + "' has conflicting initiator properties: global = true, remote = true, initiator = " + new String(entry.initiator()) + ", profile.handle = " + profile.handle()); //int b = nextQueue.noticeURL.stackSize(NoticedURL.STACK_TYPE_LIMIT); nextQueue.noticeURL.push(NoticedURL.STACK_TYPE_LIMIT, entry); //assert b < nextQueue.noticeURL.stackSize(NoticedURL.STACK_TYPE_LIMIT); //this.log.logInfo("stacked/global: " + entry.url().toString() + ", stacksize = " + nextQueue.noticeURL.stackSize(NoticedURL.STACK_TYPE_LIMIT)); } else if (local) { - if (proxy) this.log.logWarning("URL '" + entry.url().toString() + "' has conflicting initiator properties: local = true, proxy = true, initiator = " + new String(entry.initiator()) + ", profile.handle = " + profile.handle()); + if (proxy) this.log.logWarning("URL '" + entry.url().toString() + "' has conflicting initiator properties: local = true, proxy = true, initiator = proxy" + ", profile.handle = " + profile.handle()); if (remote) this.log.logWarning("URL '" + entry.url().toString() + "' has conflicting initiator properties: local = true, remote = true, initiator = " + new String(entry.initiator()) + ", profile.handle = " + profile.handle()); //int b = nextQueue.noticeURL.stackSize(NoticedURL.STACK_TYPE_CORE); nextQueue.noticeURL.push(NoticedURL.STACK_TYPE_CORE, entry); diff --git a/source/net/yacy/cora/protocol/Client.java b/source/net/yacy/cora/protocol/Client.java index c5e9f09cd..1108904ef 100644 --- a/source/net/yacy/cora/protocol/Client.java +++ b/source/net/yacy/cora/protocol/Client.java @@ -89,7 +89,7 @@ public class Client { ConnectionInfo.setMaxcount(maxcon); // connections per host (2 default) final ConnPerRouteBean connPerRoute = new ConnPerRouteBean(2); - // Increase max connections for localhost to 100 + // Increase max connections for localhost HttpHost localhost = new HttpHost("locahost"); connPerRoute.setMaxForRoute(new HttpRoute(localhost), maxcon); ConnManagerParams.setMaxConnectionsPerRoute(httpParams, connPerRoute); @@ -101,6 +101,7 @@ public class Client { HttpProtocolParams.setVersion(httpParams, HttpVersion.HTTP_1_1); // UserAgent HttpProtocolParams.setUserAgent(httpParams, "yacy (" + systemOST +") yacy.net"); + HttpProtocolParams.setUseExpectContinue(httpParams, true); /** * HTTP connection settings */ @@ -124,7 +125,7 @@ public class Client { schemeRegistry.register(new Scheme("https", SSLSocketFactory.getSocketFactory(), 443)); // cookie policy - HttpClientParams.setCookiePolicy(httpParams, CookiePolicy.BEST_MATCH); + HttpClientParams.setCookiePolicy(httpParams, CookiePolicy.RFC_2965); ClientConnectionManager clientConnectionManager = new ThreadSafeClientConnManager(httpParams, schemeRegistry);