Index: SRUAggregator/trunk/aggregator_devel.yml
===================================================================
--- SRUAggregator/trunk/aggregator_devel.yml	(revision 6395)
+++ SRUAggregator/trunk/aggregator_devel.yml	(revision 6396)
@@ -8,5 +8,5 @@
 
   SCAN_MAX_DEPTH: 1 # recommended 3
-  SCAN_TASK_INITIAL_DELAY: 2
+  SCAN_TASK_INITIAL_DELAY: 0
   SCAN_TASK_INTERVAL: 12
   SCAN_TASK_TIME_UNIT: HOURS
Index: SRUAggregator/trunk/pom.xml
===================================================================
--- SRUAggregator/trunk/pom.xml	(revision 6395)
+++ SRUAggregator/trunk/pom.xml	(revision 6396)
@@ -8,5 +8,5 @@
 	<groupId>eu.clarin.sru.fcs</groupId>
 	<artifactId>aggregator</artifactId>
-	<version>2.0.0-beta-52</version>
+	<version>2.0.0-beta-53</version>
 	<name>FCS Aggregator</name>
 
@@ -114,5 +114,28 @@
 			<type>jar</type>
 		</dependency>
-	</dependencies>
+
+		<dependency>
+			<groupId>org.apache.httpcomponents</groupId>
+			<artifactId>httpclient</artifactId>
+			<version>4.3.6</version>
+			<exclusions>
+				<exclusion>
+					<groupId>commons-codec</groupId>
+					<artifactId>commons-codec</artifactId>
+				</exclusion>
+			</exclusions>
+		</dependency>
+		<dependency>
+			<groupId>com.sun.jersey.contribs</groupId>
+			<artifactId>jersey-apache-client4</artifactId>
+			<version>1.18.1</version>
+			<exclusions>
+				<exclusion>
+					<groupId>org.apache.httpcomponents</groupId>
+					<artifactId>httpclient</artifactId>
+				</exclusion>
+			</exclusions>
+		</dependency>
+ 	</dependencies>
 
 	<build>
Index: SRUAggregator/trunk/src/main/java/eu/clarin/sru/fcs/aggregator/scan/CenterRegistryLive.java
===================================================================
--- SRUAggregator/trunk/src/main/java/eu/clarin/sru/fcs/aggregator/scan/CenterRegistryLive.java	(revision 6395)
+++ SRUAggregator/trunk/src/main/java/eu/clarin/sru/fcs/aggregator/scan/CenterRegistryLive.java	(revision 6396)
@@ -1,5 +1,5 @@
 package eu.clarin.sru.fcs.aggregator.scan;
 
-import eu.clarin.sru.fcs.aggregator.scan.EndpointFilter;
+import com.sun.jersey.api.client.Client;
 import eu.clarin.weblicht.bindings.cmd.StringBinding;
 import eu.clarin.weblicht.bindings.cmd.cp.CenterExtendedInformation;
@@ -24,8 +24,13 @@
 
 	private static final Logger LOGGER = Logger.getLogger(CenterRegistryLive.class.getName());
+
+    private static final Integer CONNECT_TIMEOUT = 3000;
+    private static final Integer READ_TIMEOUT = 10000;
+
 	private String centerRegistryUrl;
 	private boolean hasInstitutionsLoaded = false;
 	private List<Institution> centers = new ArrayList<Institution>();
 	private final EndpointFilter filter;
+    private final Client client;
 
 	public CenterRegistryLive(String centerRegistryUrl, EndpointFilter filter) {
@@ -33,4 +38,5 @@
 		this.centerRegistryUrl = centerRegistryUrl;
 		this.filter = filter;
+        this.client = ClientFactory.create(CONNECT_TIMEOUT, READ_TIMEOUT);
 	}
 
@@ -42,5 +48,4 @@
 	@Override
 	public void loadCQLInstitutions() {
-
 		if (hasInstitutionsLoaded) {
 			return;
@@ -48,5 +53,5 @@
 		hasInstitutionsLoaded = true;
 		URI url = URI.create(centerRegistryUrl);
-		try (CenterRegistryConnector connector = new CenterRegistryConnector(url, 30000)) {
+		try (CenterRegistryConnector connector = new CenterRegistryConnector(client, url)) {
 			List<Center> regCenters = connector.retrieveCenters();
 			for (Center regCenter : regCenters) {
Index: SRUAggregator/trunk/src/main/java/eu/clarin/sru/fcs/aggregator/scan/ClientFactory.java
===================================================================
--- SRUAggregator/trunk/src/main/java/eu/clarin/sru/fcs/aggregator/scan/ClientFactory.java	(revision 6396)
+++ SRUAggregator/trunk/src/main/java/eu/clarin/sru/fcs/aggregator/scan/ClientFactory.java	(revision 6396)
@@ -0,0 +1,79 @@
+package eu.clarin.sru.fcs.aggregator.scan;
+
+import com.sun.jersey.api.client.Client;
+import com.sun.jersey.api.client.filter.LoggingFilter;
+import com.sun.jersey.client.apache4.ApacheHttpClient4;
+import com.sun.jersey.client.apache4.ApacheHttpClient4Handler;
+import org.apache.http.client.HttpClient;
+import org.apache.http.impl.client.HttpClientBuilder;
+import org.apache.http.impl.client.LaxRedirectStrategy;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.TrustManager;
+import javax.net.ssl.X509TrustManager;
+import java.security.KeyManagementException;
+import java.security.NoSuchAlgorithmException;
+import java.security.SecureRandom;
+import java.security.cert.CertificateException;
+import java.security.cert.X509Certificate;
+
+/**
+ * Create {@link Client} instances that:
+ * <p/>
+ * <ul>
+ * <li>Follow redirects.</li>
+ * <li>Accept any SSL connection.</li>
+ * </ul>
+ * <p/>
+ * We might reconsider the latter feature though ;).
+ *
+ * @author DaniÃ«l de Kok <me@danieldk.eu>
+ * Shamelessly copied from the weblicht Harvester by emanueldima
+ */
+public class ClientFactory {
+    private static final Logger LOGGER = LoggerFactory.getLogger(ClientFactory.class);
+
+    public static Client create(int connectTimeout, int readTimeout) {
+        SSLContext sc = null;
+        try {
+            sc = SSLContext.getInstance("SSL");
+            sc.init(null, trustAllCerts, new SecureRandom());
+        } catch (NoSuchAlgorithmException e) {
+            LOGGER.error("Unknown algorithm, SSL: {}", e.getMessage());
+        } catch (KeyManagementException e) {
+            LOGGER.error("Key management problem: {}", e.getMessage());
+        }
+
+        HttpClient httpClient = HttpClientBuilder.create()
+                .setRedirectStrategy(new LaxRedirectStrategy())
+                .setSslcontext(sc)
+                .build();
+
+        Client client = new ApacheHttpClient4(new ApacheHttpClient4Handler(httpClient, null, false));
+        client.setConnectTimeout(connectTimeout);
+        client.setReadTimeout(readTimeout);
+        client.setFollowRedirects(true);
+
+        return client;
+    }
+
+    private static TrustManager[] trustAllCerts = {new X509TrustManager() {
+        @Override
+        public void checkClientTrusted(X509Certificate[] x509Certificates, String s) throws CertificateException {
+        }
+
+        @Override
+        public void checkServerTrusted(X509Certificate[] x509Certificates, String s) throws CertificateException {
+        }
+
+        @Override
+        public X509Certificate[] getAcceptedIssuers() {
+            return null;
+        }
+    }};
+
+    private ClientFactory() {
+    }
+}
Index: SRUAggregator/trunk/src/main/java/eu/clarin/sru/fcs/aggregator/scan/ScanCrawlTask.java
===================================================================
--- SRUAggregator/trunk/src/main/java/eu/clarin/sru/fcs/aggregator/scan/ScanCrawlTask.java	(revision 6395)
+++ SRUAggregator/trunk/src/main/java/eu/clarin/sru/fcs/aggregator/scan/ScanCrawlTask.java	(revision 6396)
@@ -77,15 +77,15 @@
 			Corpora corpora = scanCrawler.crawl();
 
-			corporaAtom.set(corpora);
-			scanStatisticsAtom.set(scanCrawler.getStatistics());
-			searchStatisticsAtom.set(new Statistics()); // reset search stats
 			long time = System.currentTimeMillis() - time0;
-
 			log.info("ScanCrawlTask: crawl done in {}s, number of root corpora: {}",
 					time / 1000., corpora.getCorpora().size());
 
 			if (corpora.getCorpora().isEmpty()) {
-				log.warn("ScanCrawlTask: Skipped writing to disk (no corpora). Finished.");
+				log.warn("ScanCrawlTask: No corpora: skipped updating stats; skipped writing to disk.");
 			} else {
+				corporaAtom.set(corpora);
+				scanStatisticsAtom.set(scanCrawler.getStatistics());
+				searchStatisticsAtom.set(new Statistics()); // reset search stats
+
 				dump(corpora, cachedCorpora, oldCachedCorpora);
 				log.info("ScanCrawlTask: wrote to disk, finished");
Index: SRUAggregator/trunk/src/main/resources/assets/js/components.js
===================================================================
--- SRUAggregator/trunk/src/main/resources/assets/js/components.js	(revision 6395)
+++ SRUAggregator/trunk/src/main/resources/assets/js/components.js	(revision 6396)
@@ -9,5 +9,5 @@
 window.MyReact = {};
 
-var JQuerySlide = React.createClass({displayName: "JQuerySlide",
+var JQuerySlide = React.createClass({displayName: 'JQuerySlide',
 	componentWillEnter: function(callback){
 		var el = jQuery(this.getDOMNode());
@@ -30,5 +30,5 @@
 window.MyReact.JQuerySlide = JQuerySlide;
  
-var JQueryFade = React.createClass({displayName: "JQueryFade",
+var JQueryFade = React.createClass({displayName: 'JQueryFade',
 	componentWillEnter: function(callback){
 		var el = jQuery(this.getDOMNode());
@@ -45,5 +45,5 @@
 window.MyReact.JQueryFade = JQueryFade;
 
-window.MyReact.ErrorPane = React.createClass({displayName: "ErrorPane",
+window.MyReact.ErrorPane = React.createClass({displayName: 'ErrorPane',
 	propTypes: {
 		errorMessages: PT.array.isRequired,
@@ -82,10 +82,10 @@
 	renderModal: function(title, content) {
 		return (
-			React.createElement("div", {onClick: this.handleClick, className: "modal fade", role: "dialog", "aria-hidden": "true"}, 
+			React.createElement("div", {onClick: this.handleClick, className: "modal fade", role: "dialog", 'aria-hidden': "true"}, 
 				React.createElement("div", {className: "modal-dialog"}, 
 					React.createElement("div", {className: "modal-content"}, 
 						React.createElement("div", {className: "modal-header"}, 
-							React.createElement("button", {type: "button", className: "close", "data-dismiss": "modal"}, 
-								React.createElement("span", {"aria-hidden": "true"}, "Ã"), 
+							React.createElement("button", {type: "button", className: "close", 'data-dismiss': "modal"}, 
+								React.createElement("span", {'aria-hidden': "true"}, "Ã"), 
 								React.createElement("span", {className: "sr-only"}, "Close")
 							), 
@@ -96,5 +96,5 @@
 						), 
 						React.createElement("div", {className: "modal-footer"}, 
-							React.createElement("button", {type: "button", className: "btn btn-default", "data-dismiss": "modal"}, "Close")
+							React.createElement("button", {type: "button", className: "btn btn-default", 'data-dismiss': "modal"}, "Close")
 						)
 					)
@@ -106,5 +106,5 @@
 
 
-window.MyReact.Modal = React.createClass({displayName: "Modal",
+window.MyReact.Modal = React.createClass({displayName: 'Modal',
 	propTypes: {
 		title: PT.object.isRequired,
@@ -121,10 +121,10 @@
 	render: function() {
 		return (
-			React.createElement("div", {onClick: this.handleClick, className: "modal fade", role: "dialog", "aria-hidden": "true"}, 
+			React.createElement("div", {onClick: this.handleClick, className: "modal fade", role: "dialog", 'aria-hidden': "true"}, 
 				React.createElement("div", {className: "modal-dialog"}, 
 					React.createElement("div", {className: "modal-content"}, 
 						React.createElement("div", {className: "modal-header"}, 
-							React.createElement("button", {type: "button", className: "close", "data-dismiss": "modal"}, 
-								React.createElement("span", {"aria-hidden": "true"}, "Ã"), 
+							React.createElement("button", {type: "button", className: "close", 'data-dismiss': "modal"}, 
+								React.createElement("span", {'aria-hidden': "true"}, "Ã"), 
 								React.createElement("span", {className: "sr-only"}, "Close")
 							), 
@@ -135,5 +135,5 @@
 						), 
 						React.createElement("div", {className: "modal-footer"}, 
-							React.createElement("button", {type: "button", className: "btn btn-default", "data-dismiss": "modal"}, "Close")
+							React.createElement("button", {type: "button", className: "btn btn-default", 'data-dismiss': "modal"}, "Close")
 						)
 					)
@@ -182,5 +182,5 @@
 };
 
-window.MyReact.Popover = React.createClass({displayName: "Popover",
+window.MyReact.Popover = React.createClass({displayName: 'Popover',
 	propTypes: {
 		placement: PT.string,
@@ -202,5 +202,5 @@
 });
 
-window.MyReact.InfoPopover = React.createClass({displayName: "InfoPopover",
+window.MyReact.InfoPopover = React.createClass({displayName: 'InfoPopover',
 	propTypes: {
 		title: PT.string.isRequired,
@@ -221,5 +221,5 @@
 
 
-window.MyReact.Panel = React.createClass({displayName: "Panel",
+window.MyReact.Panel = React.createClass({displayName: 'Panel',
 	propTypes: {
 		title:PT.object.isRequired,
@@ -258,5 +258,5 @@
 });
 
-window.MyReact.PanelGroup = React.createClass({displayName: "PanelGroup",
+window.MyReact.PanelGroup = React.createClass({displayName: 'PanelGroup',
 	render: function() {
 		return	React.createElement("div", {className: "panel-group"}, " ", this.props.children, " ");
Index: SRUAggregator/trunk/src/main/resources/assets/js/corpora.js
===================================================================
--- SRUAggregator/trunk/src/main/resources/assets/js/corpora.js	(revision 6395)
+++ SRUAggregator/trunk/src/main/resources/assets/js/corpora.js	(revision 6396)
@@ -13,5 +13,5 @@
 /////////////////////////////////
 
-var CorpusView = window.MyAggregator.CorpusView = React.createClass({displayName: "CorpusView",
+var CorpusView = window.MyAggregator.CorpusView = React.createClass({displayName: 'CorpusView',
 	propTypes: {
 		corpora: PT.object.isRequired,
@@ -123,6 +123,6 @@
 		return	React.createElement("button", {className: "btn btn-default"}, 
 					 corpus.selected ?
-						React.createElement("span", {className: "glyphicon glyphicon-check", "aria-hidden": "true"}) :
-						React.createElement("span", {className: "glyphicon glyphicon-unchecked", "aria-hidden": "true"})
+						React.createElement("span", {className: "glyphicon glyphicon-check", 'aria-hidden': "true"}) :
+						React.createElement("span", {className: "glyphicon glyphicon-unchecked", 'aria-hidden': "true"})
 					
 				);
@@ -136,6 +136,6 @@
 					React.createElement("a", null, 
 						corpus.expanded ?
-							React.createElement("span", {className: "glyphicon glyphicon-minus", "aria-hidden": "true"}):
-							React.createElement("span", {className: "glyphicon glyphicon-plus", "aria-hidden": "true"}), 
+							React.createElement("span", {className: "glyphicon glyphicon-minus", 'aria-hidden': "true"}):
+							React.createElement("span", {className: "glyphicon glyphicon-plus", 'aria-hidden': "true"}), 
 						
 						corpus.expanded ? " Collapse ":" Expand ", " (", corpus.subCorpora.length, " subcollections)"
@@ -245,5 +245,5 @@
 });
 
-var SearchCorpusBox = React.createClass({displayName: "SearchCorpusBox",
+var SearchCorpusBox = React.createClass({displayName: 'SearchCorpusBox',
 	propTypes: {
 		search: PT.func.isRequired,
Index: SRUAggregator/trunk/src/main/resources/assets/js/main.js
===================================================================
--- SRUAggregator/trunk/src/main/resources/assets/js/main.js	(revision 6395)
+++ SRUAggregator/trunk/src/main/resources/assets/js/main.js	(revision 6396)
@@ -3,5 +3,5 @@
 "use strict";
 
-var VERSION = window.MyAggregator.VERSION = "v.2.0.0-beta-52";
+var VERSION = window.MyAggregator.VERSION = "v.2.0.0-beta-53";
 
 var URLROOT = window.MyAggregator.URLROOT =
@@ -36,5 +36,5 @@
 */
 
-var Main = React.createClass({displayName: "Main",
+var Main = React.createClass({displayName: 'Main',
 	componentWillMount: function() {
 		routeFromLocation.bind(this)();
@@ -215,5 +215,5 @@
 
 
-var StatisticsPage = React.createClass({displayName: "StatisticsPage",
+var StatisticsPage = React.createClass({displayName: 'StatisticsPage',
 	propTypes: {
 		ajax: PT.func.isRequired,
@@ -400,5 +400,5 @@
 });
 
-var HelpPage = React.createClass({displayName: "HelpPage",
+var HelpPage = React.createClass({displayName: 'HelpPage',
 	openHelpDesk: function() {
 		window.open('http://support.clarin-d.de/mail/form.php?queue=Aggregator&lang=en',
@@ -444,5 +444,5 @@
 					"or if want to send a feedback, you can write to Clarin-D helpdesk: "), 
 					React.createElement("button", {type: "button", className: "btn btn-default btn-lg", onClick: this.openHelpDesk}, 
-						React.createElement("span", {className: "glyphicon glyphicon-question-sign", "aria-hidden": "true"}), 
+						React.createElement("span", {className: "glyphicon glyphicon-question-sign", 'aria-hidden': "true"}), 
 						"Â HelpDesk"
 					)
@@ -453,5 +453,5 @@
 });
 
-var AboutPage = React.createClass({displayName: "AboutPage",
+var AboutPage = React.createClass({displayName: 'AboutPage',
 	render: function() {
 		return	React.createElement("div", null, 
@@ -471,5 +471,5 @@
 						React.createElement("h3", null, "Statistics"), 
 						React.createElement("button", {type: "button", className: "btn btn-default btn-lg", onClick: function() {main.toStatistics(true);}}, 
-							React.createElement("span", {className: "glyphicon glyphicon-cog", "aria-hidden": "true"}, " "), 
+							React.createElement("span", {className: "glyphicon glyphicon-cog", 'aria-hidden': "true"}, " "), 
 							"View server log"
 						)
@@ -545,5 +545,5 @@
 });
 
-var Footer = React.createClass({displayName: "Footer",
+var Footer = React.createClass({displayName: 'Footer',
 	toAbout: function(e) {
 		main.toAbout(true);
@@ -578,5 +578,5 @@
 });
 
-var EmbeddedFooter = React.createClass({displayName: "EmbeddedFooter",
+var EmbeddedFooter = React.createClass({displayName: 'EmbeddedFooter',
 	render: function() {
 		return (
Index: SRUAggregator/trunk/src/main/resources/assets/js/main.jsx
===================================================================
--- SRUAggregator/trunk/src/main/resources/assets/js/main.jsx	(revision 6395)
+++ SRUAggregator/trunk/src/main/resources/assets/js/main.jsx	(revision 6396)
@@ -3,5 +3,5 @@
 "use strict";
 
-var VERSION = window.MyAggregator.VERSION = "v.2.0.0-beta-52";
+var VERSION = window.MyAggregator.VERSION = "v.2.0.0-beta-53";
 
 var URLROOT = window.MyAggregator.URLROOT =
Index: SRUAggregator/trunk/src/main/resources/assets/js/search.js
===================================================================
--- SRUAggregator/trunk/src/main/resources/assets/js/search.js	(revision 6395)
+++ SRUAggregator/trunk/src/main/resources/assets/js/search.js	(revision 6396)
@@ -209,5 +209,5 @@
 
 
-var AggregatorPage = window.MyAggregator.AggregatorPage = React.createClass({displayName: "AggregatorPage",
+var AggregatorPage = window.MyAggregator.AggregatorPage = React.createClass({displayName: 'AggregatorPage',
 	propTypes: {
 		ajax: PT.func.isRequired,
@@ -563,5 +563,5 @@
 									), 
 									React.createElement("button", {className: "form-control btn btn-default", 
-											"aria-expanded": "false", "data-toggle": "dropdown"}, 
+											'aria-expanded': "false", 'data-toggle': "dropdown"}, 
 										layer.name, " ", React.createElement("span", {className: "caret"})
 									)
@@ -629,5 +629,5 @@
 /////////////////////////////////
 
-var LanguageSelector = React.createClass({displayName: "LanguageSelector",
+var LanguageSelector = React.createClass({displayName: 'LanguageSelector',
 	propTypes: {
 		anyLanguage: PT.array.isRequired,
@@ -821,6 +821,6 @@
 		return (
 			React.createElement("div", {className: "dropdown"}, 
-				React.createElement("button", {className: "btn btn-flat", "aria-expanded": "false", "data-toggle": "dropdown"}, 
-					React.createElement("span", {className: "glyphicon glyphicon-download-alt", "aria-hidden": "true"}), 
+				React.createElement("button", {className: "btn btn-flat", 'aria-expanded': "false", 'data-toggle': "dropdown"}, 
+					React.createElement("span", {className: "glyphicon glyphicon-download-alt", 'aria-hidden': "true"}), 
 					" ", " Download ", " ", 
 					React.createElement("span", {className: "caret"})
@@ -843,6 +843,6 @@
 		return (
 			React.createElement("div", {className: "dropdown"}, 
-				React.createElement("button", {className: "btn btn-flat", "aria-expanded": "false", "data-toggle": "dropdown"}, 
-					React.createElement("span", {className: "glyphicon glyphicon-export", "aria-hidden": "true"}), 
+				React.createElement("button", {className: "btn btn-flat", 'aria-expanded': "false", 'data-toggle': "dropdown"}, 
+					React.createElement("span", {className: "glyphicon glyphicon-export", 'aria-hidden': "true"}), 
 					" ", " Use Weblicht ", " ", 
 					React.createElement("span", {className: "caret"})
@@ -863,5 +863,5 @@
 };
 
-var ZoomedResult = React.createClass({displayName: "ZoomedResult",
+var ZoomedResult = React.createClass({displayName: 'ZoomedResult',
 	propTypes: {
 		corpusHit: PT.object,
@@ -909,5 +909,5 @@
 			return React.createElement("span", {style: {fontStyle:'italic'}}, "No other results available for this query");
 		return	React.createElement("button", {className: "btn btn-default", onClick: this.nextResults}, 
-					React.createElement("span", {className: "glyphicon glyphicon-option-horizontal", "aria-hidden": "true"}), " More Results"
+					React.createElement("span", {className: "glyphicon glyphicon-option-horizontal", 'aria-hidden': "true"}), " More Results"
 				);
 	},
@@ -969,5 +969,5 @@
 });
 
-var Results = React.createClass({displayName: "Results",
+var Results = React.createClass({displayName: 'Results',
 	propTypes: {
 		collhits: PT.object.isRequired,
@@ -1017,8 +1017,8 @@
 						React.createElement("div", {className: "progress", style: {marginBottom:10}}, 
 							React.createElement("div", {className: "progress-bar progress-bar-striped active", role: "progressbar", 
-								"aria-valuenow": percents, "aria-valuemin": "0", "aria-valuemax": "100", style: styleperc}), 
+								'aria-valuenow': percents, 'aria-valuemin': "0", 'aria-valuemax': "100", style: styleperc}), 
 							percents > 2 ? false :
 								React.createElement("div", {className: "progress-bar progress-bar-striped active", role: "progressbar", 
-									"aria-valuenow": "100", "aria-valuemin": "0", "aria-valuemax": "100", 
+									'aria-valuenow': "100", 'aria-valuemin': "0", 'aria-valuemax': "100", 
 									style: {width: '100%', backgroundColor:'#888'}})
 							
