diff --git a/.classpath b/.classpath
index 5fbd5c72f..754808cfa 100644
--- a/.classpath
+++ b/.classpath
@@ -1,87 +1,90 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/addon/YaCy.app/Contents/Info.plist b/addon/YaCy.app/Contents/Info.plist
index 12a4ae6d3..8fb52173d 100644
--- a/addon/YaCy.app/Contents/Info.plist
+++ b/addon/YaCy.app/Contents/Info.plist
@@ -61,19 +61,23 @@
$JAVAROOT/lib/jaudiotagger-2.0.4-20111207.115108-15.jar
$JAVAROOT/lib/jcifs-1.3.17.jar
$JAVAROOT/lib/jcl-over-slf4j-1.7.2.jar
- $JAVAROOT/lib/jempbox-1.8.4.jar
- $JAVAROOT/lib/jetty-client-8.1.14.v20131031.jar
- $JAVAROOT/lib/jetty-continuation-8.1.14.v20131031.jar
- $JAVAROOT/lib/jetty-http-8.1.14.v20131031.jar
- $JAVAROOT/lib/jetty-io-8.1.14.v20131031.jar
- $JAVAROOT/lib/jetty-security-8.1.14.v20131031.jar
- $JAVAROOT/lib/jetty-server-8.1.14.v20131031.jar
- $JAVAROOT/lib/jetty-servlet-8.1.14.v20131031.jar
- $JAVAROOT/lib/jetty-servlets-8.1.14.v20131031.jar
- $JAVAROOT/lib/jetty-util-8.1.14.v20131031.jar
- $JAVAROOT/lib/jetty-webapp-8.1.14.v20131031.jar
- $JAVAROOT/lib/jetty-xml-8.1.14.v20131031.jar
- $JAVAROOT/lib/jsch-0.1.50.jar
+ $JAVAROOT/lib/jempbox-1.8.4.jar
+ $JAVAROOT/lib/javax.servlet-api-3.1.0.jar
+ $JAVAROOT/lib/jetty-client-9.1.4.v20140401.jar
+ $JAVAROOT/lib/jetty-continuation-9.1.4.v20140401.jar
+ $JAVAROOT/lib/jetty-deploy-9.1.4.v20140401.jar
+ $JAVAROOT/lib/jetty-http-9.1.4.v20140401.jar
+ $JAVAROOT/lib/jetty-io-9.1.4.v20140401.jar
+ $JAVAROOT/lib/jetty-jmx-9.1.4.v20140401.jar
+ $JAVAROOT/lib/jetty-proxy-9.1.4.v20140401.jar
+ $JAVAROOT/lib/jetty-security-9.1.4.v20140401.jar
+ $JAVAROOT/lib/jetty-server-9.1.4.v20140401.jar
+ $JAVAROOT/lib/jetty-servlet-9.1.4.v20140401.jar
+ $JAVAROOT/lib/jetty-servlets-9.1.4.v20140401.jar
+ $JAVAROOT/lib/jetty-util-9.1.4.v20140401.jar
+ $JAVAROOT/lib/jetty-webapp-9.1.4.v20140401.jar
+ $JAVAROOT/lib/jetty-xml-9.1.4.v20140401.jar
+ $JAVAROOT/lib/jsch-0.1.50.jar
$JAVAROOT/lib/json-simple-1.1.1.jar
$JAVAROOT/lib/log4j-over-slf4j-1.7.2.jar
$JAVAROOT/lib/lucene-analyzers-common-4.7.1.jar
@@ -96,7 +100,6 @@
$JAVAROOT/lib/pdfbox-1.8.4.jar
$JAVAROOT/lib/poi-3.9-20121203.jar
$JAVAROOT/lib/poi-scratchpad-3.9-20121203.jar
- $JAVAROOT/lib/servlet-api-3.0.jar
$JAVAROOT/lib/slf4j-api-1.7.2.jar
$JAVAROOT/lib/slf4j-jdk14-1.7.2.jar
$JAVAROOT/lib/solr-core-4.7.1.jar
diff --git a/build.xml b/build.xml
index c73db345d..5e97fc0c6 100644
--- a/build.xml
+++ b/build.xml
@@ -186,17 +186,21 @@
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -221,7 +225,6 @@
-
diff --git a/htroot/ConfigAccounts_p.java b/htroot/ConfigAccounts_p.java
index 596cb3c42..1f55a954a 100644
--- a/htroot/ConfigAccounts_p.java
+++ b/htroot/ConfigAccounts_p.java
@@ -38,7 +38,7 @@ import net.yacy.cora.protocol.RequestHeader;
import net.yacy.cora.util.ConcurrentLog;
import net.yacy.data.UserDB;
import net.yacy.data.UserDB.AccessRight;
-import net.yacy.http.Jetty8HttpServerImpl;
+import net.yacy.http.Jetty9HttpServerImpl;
import net.yacy.search.Switchboard;
import net.yacy.search.SwitchboardConstants;
import net.yacy.server.serverObjects;
@@ -74,7 +74,7 @@ public class ConfigAccounts_p {
env.setConfig(SwitchboardConstants.ADMIN_ACCOUNT, "");
env.setConfig(SwitchboardConstants.ADMIN_ACCOUNT_USER_NAME,user);
// make sure server accepts new credentials
- Jetty8HttpServerImpl jhttpserver = (Jetty8HttpServerImpl)sb.getHttpServer();
+ Jetty9HttpServerImpl jhttpserver = (Jetty9HttpServerImpl)sb.getHttpServer();
if (!user.equals(oldusername)) jhttpserver.removeUser(oldusername);
jhttpserver.resetUser(user);
} else {
diff --git a/lib/javax.servlet-api-3.1.0.jar b/lib/javax.servlet-api-3.1.0.jar
new file mode 100644
index 000000000..6b14c3d26
Binary files /dev/null and b/lib/javax.servlet-api-3.1.0.jar differ
diff --git a/lib/jetty-8.1.14v20131031.License b/lib/jetty-9.1.4.v20140401.License
similarity index 100%
rename from lib/jetty-8.1.14v20131031.License
rename to lib/jetty-9.1.4.v20140401.License
diff --git a/lib/jetty-client-8.1.14.v20131031.jar b/lib/jetty-client-8.1.14.v20131031.jar
deleted file mode 100644
index ef3b54f0c..000000000
Binary files a/lib/jetty-client-8.1.14.v20131031.jar and /dev/null differ
diff --git a/lib/jetty-client-9.1.4.v20140401.jar b/lib/jetty-client-9.1.4.v20140401.jar
new file mode 100644
index 000000000..39361e945
Binary files /dev/null and b/lib/jetty-client-9.1.4.v20140401.jar differ
diff --git a/lib/jetty-continuation-8.1.14.v20131031.jar b/lib/jetty-continuation-8.1.14.v20131031.jar
deleted file mode 100644
index 43c75169f..000000000
Binary files a/lib/jetty-continuation-8.1.14.v20131031.jar and /dev/null differ
diff --git a/lib/jetty-continuation-9.1.4.v20140401.jar b/lib/jetty-continuation-9.1.4.v20140401.jar
new file mode 100644
index 000000000..51d3afcbc
Binary files /dev/null and b/lib/jetty-continuation-9.1.4.v20140401.jar differ
diff --git a/lib/jetty-deploy-9.1.4.v20140401.jar b/lib/jetty-deploy-9.1.4.v20140401.jar
new file mode 100644
index 000000000..d37d45aaa
Binary files /dev/null and b/lib/jetty-deploy-9.1.4.v20140401.jar differ
diff --git a/lib/jetty-http-8.1.14.v20131031.jar b/lib/jetty-http-8.1.14.v20131031.jar
deleted file mode 100644
index 94f7c7c38..000000000
Binary files a/lib/jetty-http-8.1.14.v20131031.jar and /dev/null differ
diff --git a/lib/jetty-http-9.1.4.v20140401.jar b/lib/jetty-http-9.1.4.v20140401.jar
new file mode 100644
index 000000000..36539aeff
Binary files /dev/null and b/lib/jetty-http-9.1.4.v20140401.jar differ
diff --git a/lib/jetty-io-8.1.14.v20131031.jar b/lib/jetty-io-8.1.14.v20131031.jar
deleted file mode 100644
index 75708326b..000000000
Binary files a/lib/jetty-io-8.1.14.v20131031.jar and /dev/null differ
diff --git a/lib/jetty-io-9.1.4.v20140401.jar b/lib/jetty-io-9.1.4.v20140401.jar
new file mode 100644
index 000000000..79a7dd206
Binary files /dev/null and b/lib/jetty-io-9.1.4.v20140401.jar differ
diff --git a/lib/jetty-jmx-9.1.4.v20140401.jar b/lib/jetty-jmx-9.1.4.v20140401.jar
new file mode 100644
index 000000000..0563eda27
Binary files /dev/null and b/lib/jetty-jmx-9.1.4.v20140401.jar differ
diff --git a/lib/jetty-proxy-9.1.4.v20140401.jar b/lib/jetty-proxy-9.1.4.v20140401.jar
new file mode 100644
index 000000000..e5c3bf99e
Binary files /dev/null and b/lib/jetty-proxy-9.1.4.v20140401.jar differ
diff --git a/lib/jetty-security-8.1.14.v20131031.jar b/lib/jetty-security-8.1.14.v20131031.jar
deleted file mode 100644
index b03e81283..000000000
Binary files a/lib/jetty-security-8.1.14.v20131031.jar and /dev/null differ
diff --git a/lib/jetty-security-9.1.4.v20140401.jar b/lib/jetty-security-9.1.4.v20140401.jar
new file mode 100644
index 000000000..662aef0eb
Binary files /dev/null and b/lib/jetty-security-9.1.4.v20140401.jar differ
diff --git a/lib/jetty-server-8.1.14.v20131031.jar b/lib/jetty-server-8.1.14.v20131031.jar
deleted file mode 100644
index d03aba100..000000000
Binary files a/lib/jetty-server-8.1.14.v20131031.jar and /dev/null differ
diff --git a/lib/jetty-server-9.1.4.v20140401.jar b/lib/jetty-server-9.1.4.v20140401.jar
new file mode 100644
index 000000000..d43e7f7b3
Binary files /dev/null and b/lib/jetty-server-9.1.4.v20140401.jar differ
diff --git a/lib/jetty-servlet-8.1.14.v20131031.jar b/lib/jetty-servlet-8.1.14.v20131031.jar
deleted file mode 100644
index 1210e620d..000000000
Binary files a/lib/jetty-servlet-8.1.14.v20131031.jar and /dev/null differ
diff --git a/lib/jetty-servlet-9.1.4.v20140401.jar b/lib/jetty-servlet-9.1.4.v20140401.jar
new file mode 100644
index 000000000..63d6c3c2c
Binary files /dev/null and b/lib/jetty-servlet-9.1.4.v20140401.jar differ
diff --git a/lib/jetty-servlets-8.1.14.v20131031.jar b/lib/jetty-servlets-8.1.14.v20131031.jar
deleted file mode 100644
index 0ab9e0abe..000000000
Binary files a/lib/jetty-servlets-8.1.14.v20131031.jar and /dev/null differ
diff --git a/lib/jetty-servlets-9.1.4.v20140401.jar b/lib/jetty-servlets-9.1.4.v20140401.jar
new file mode 100644
index 000000000..0b7daf0c1
Binary files /dev/null and b/lib/jetty-servlets-9.1.4.v20140401.jar differ
diff --git a/lib/jetty-util-8.1.14.v20131031.jar b/lib/jetty-util-8.1.14.v20131031.jar
deleted file mode 100644
index 6fc403191..000000000
Binary files a/lib/jetty-util-8.1.14.v20131031.jar and /dev/null differ
diff --git a/lib/jetty-util-9.1.4.v20140401.jar b/lib/jetty-util-9.1.4.v20140401.jar
new file mode 100644
index 000000000..79a1abd54
Binary files /dev/null and b/lib/jetty-util-9.1.4.v20140401.jar differ
diff --git a/lib/jetty-webapp-8.1.14.v20131031.jar b/lib/jetty-webapp-8.1.14.v20131031.jar
deleted file mode 100644
index fc314cc75..000000000
Binary files a/lib/jetty-webapp-8.1.14.v20131031.jar and /dev/null differ
diff --git a/lib/jetty-webapp-9.1.4.v20140401.jar b/lib/jetty-webapp-9.1.4.v20140401.jar
new file mode 100644
index 000000000..826956333
Binary files /dev/null and b/lib/jetty-webapp-9.1.4.v20140401.jar differ
diff --git a/lib/jetty-xml-8.1.14.v20131031.jar b/lib/jetty-xml-8.1.14.v20131031.jar
deleted file mode 100644
index faf6ad4ab..000000000
Binary files a/lib/jetty-xml-8.1.14.v20131031.jar and /dev/null differ
diff --git a/lib/jetty-xml-9.1.4.v20140401.jar b/lib/jetty-xml-9.1.4.v20140401.jar
new file mode 100644
index 000000000..f0d15393c
Binary files /dev/null and b/lib/jetty-xml-9.1.4.v20140401.jar differ
diff --git a/nbproject/project.xml b/nbproject/project.xml
index 42f28724b..d73180213 100644
--- a/nbproject/project.xml
+++ b/nbproject/project.xml
@@ -22,11 +22,6 @@
htroot
UTF-8
-
-
- .
- UTF-8
-
@@ -82,10 +77,15 @@
source
+ lib/J7Zip-modified.jar;lib/activation.jar;lib/apache-mime4j-0.6.jar;lib/bcmail-jdk15-145.jar;lib/bcprov-jdk15-145.jar;lib/commons-codec-1.7.jar;lib/commons-compress-1.8.jar;lib/commons-fileupload-1.2.2.jar;lib/commons-io-2.1.jar;lib/commons-jxpath-1.3.jar;lib/commons-lang-2.6.jar;lib/commons-logging-1.1.3.jar;lib/fontbox-1.8.4.jar;lib/geronimo-stax-api_1.0_spec-1.0.1.jar;lib/guava-16.0.1.jar;lib/htmllexer.jar;lib/httpclient-4.3.3.jar;lib/httpcore-4.3.2.jar;lib/httpmime-4.3.3.jar;lib/icu4j-core.jar;lib/jakarta-oro-2.0.8.jar;lib/jaudiotagger-2.0.4-20111207.115108-15.jar;lib/javax.servlet-api-3.1.0.jar;lib/jcifs-1.3.17.jar;lib/jcl-over-slf4j-1.7.2.jar;lib/jempbox-1.8.4.jar;lib/jetty-client-9.1.4.v20140401.jar;lib/jetty-continuation-9.1.4.v20140401.jar;lib/jetty-deploy-9.1.4.v20140401.jar;lib/jetty-http-9.1.4.v20140401.jar;lib/jetty-io-9.1.4.v20140401.jar;lib/jetty-jmx-9.1.4.v20140401.jar;lib/jetty-proxy-9.1.4.v20140401.jar;lib/jetty-security-9.1.4.v20140401.jar;lib/jetty-server-9.1.4.v20140401.jar;lib/jetty-servlet-9.1.4.v20140401.jar;lib/jetty-servlets-9.1.4.v20140401.jar;lib/jetty-util-9.1.4.v20140401.jar;lib/jetty-webapp-9.1.4.v20140401.jar;lib/jetty-xml-9.1.4.v20140401.jar;lib/jsch-0.1.50.jar;lib/json-simple-1.1.1.jar;lib/jsoup-1.6.3.jar;lib/log4j-over-slf4j-1.7.2.jar;lib/lucene-analyzers-common-4.7.1.jar;lib/lucene-analyzers-phonetic-4.7.1.jar;lib/lucene-classification-4.7.1.jar;lib/lucene-codecs-4.7.1.jar;lib/lucene-core-4.7.1.jar;lib/lucene-facet-4.7.1.jar;lib/lucene-grouping-4.7.1.jar;lib/lucene-highlighter-4.7.1.jar;lib/lucene-join-4.7.1.jar;lib/lucene-memory-4.7.1.jar;lib/lucene-misc-4.7.1.jar;lib/lucene-queries-4.7.1.jar;lib/lucene-queryparser-4.7.1.jar;lib/lucene-spatial-4.7.1.jar;lib/lucene-suggest-4.7.1.jar;lib/metadata-extractor-2.6.2.jar;lib/noggit-0.5.jar;lib/pdfbox-1.8.4.jar;lib/poi-3.9-20121203.jar;lib/poi-scratchpad-3.9-20121203.jar;lib/servlet-api-3.0.jar;lib/slf4j-api-1.7.2.jar;lib/slf4j-jdk14-1.7.2.jar;lib/solr-core-4.7.1.jar;lib/solr-solrj-4.7.1.jar;lib/spatial4j-0.4.1.jar;lib/webcat-0.1-swf.jar;lib/wstx-asl-3.2.9.jar;lib/xercesImpl.jar;lib/xml-apis.jar;lib/zookeeper-3.4.5.jar
+ lib/yacycore.jar
+ 1.7
+
+
htroot
- lib/J7Zip-modified.jar;lib/activation.jar;lib/apache-mime4j-0.6.jar;lib/arq-2.8.7.jar;lib/bcmail-jdk15-145.jar;lib/bcprov-jdk15-145.jar;lib/commons-codec-1.7.jar;lib/commons-compress-1.8.jar;lib/commons-fileupload-1.2.2.jar;lib/commons-io-2.1.jar;lib/commons-jxpath-1.3.jar;lib/commons-lang-2.6.jar;lib/commons-logging-1.1.3.jar;lib/fontbox-1.8.4.jar;lib/geronimo-stax-api_1.0_spec-1.0.1.jar;lib/guava-16.0.1.jar;lib/htmllexer.jar;lib/httpclient-4.3.3.jar;lib/httpcore-4.3.2.jar;lib/httpmime-4.3.3.jar;lib/icu4j-core.jar;lib/iri-0.8.jar;lib/jakarta-oro-2.0.8.jar;lib/jaudiotagger-2.0.4-20111207.115108-15.jar;lib/jcifs-1.3.17.jar;lib/jcl-over-slf4j-1.7.2.jar;lib/jempbox-1.8.4.jar;lib/jetty-client-8.1.14.v20131031.jar;lib/jetty-continuation-8.1.14.v20131031.jar;lib/jetty-http-8.1.14.v20131031.jar;lib/jetty-io-8.1.14.v20131031.jar;lib/jetty-security-8.1.14.v20131031.jar;lib/jetty-server-8.1.14.v20131031.jar;lib/jetty-servlet-8.1.14.v20131031.jar;lib/jetty-servlets-8.1.14.v20131031.jar;lib/jetty-util-8.1.14.v20131031.jar;lib/jetty-webapp-8.1.14.v20131031.jar;lib/jetty-xml-8.1.14.v20131031.jar;lib/jsch-0.1.50.jar;lib/json-simple-1.1.1.jar;lib/jsoup-1.6.3.jar;lib/log4j-over-slf4j-1.7.2.jar;lib/lucene-analyzers-common-4.7.1.jar;lib/lucene-analyzers-phonetic-4.7.1.jar;lib/lucene-classification-4.7.1.jar;lib/lucene-codecs-4.7.1.jar;lib/lucene-core-4.7.1.jar;lib/lucene-facet-4.7.1.jar;lib/lucene-grouping-4.7.1.jar;lib/lucene-highlighter-4.7.1.jar;lib/lucene-join-4.7.1.jar;lib/lucene-memory-4.7.1.jar;lib/lucene-misc-4.7.1.jar;lib/lucene-queries-4.7.1.jar;lib/lucene-queryparser-4.7.1.jar;lib/lucene-spatial-4.7.1.jar;lib/lucene-suggest-4.7.1.jar;lib/metadata-extractor-2.6.2.jar;lib/noggit-0.5.jar;lib/pdfbox-1.8.4.jar;lib/poi-3.9-20121203.jar;lib/poi-scratchpad-3.9-20121203.jar;lib/sax-2.0.1.jar;lib/servlet-api-3.0.jar;lib/slf4j-api-1.7.2.jar;lib/slf4j-jdk14-1.7.2.jar;lib/solr-core-4.7.1.jar;lib/solr-solrj-4.7.1.jar;lib/spatial4j-0.3.jar;lib/webcat-0.1-swf.jar;lib/wstx-asl-3.2.9.jar;lib/xercesImpl.jar;lib/xml-apis.jar;lib/zookeeper-3.4.5.jar
+ lib/J7Zip-modified.jar;lib/activation.jar;lib/apache-mime4j-0.6.jar;lib/arq-2.8.7.jar;lib/bcmail-jdk15-145.jar;lib/bcprov-jdk15-145.jar;lib/commons-codec-1.7.jar;lib/commons-compress-1.8.jar;lib/commons-fileupload-1.2.2.jar;lib/commons-io-2.1.jar;lib/commons-jxpath-1.3.jar;lib/commons-lang-2.6.jar;lib/commons-logging-1.1.3.jar;lib/fontbox-1.8.4.jar;lib/geronimo-stax-api_1.0_spec-1.0.1.jar;lib/guava-16.0.1.jar;lib/htmllexer.jar;lib/httpclient-4.3.3.jar;lib/httpcore-4.3.2.jar;lib/httpmime-4.3.3.jar;lib/icu4j-core.jar;lib/iri-0.8.jar;lib/jakarta-oro-2.0.8.jar;lib/jaudiotagger-2.0.4-20111207.115108-15.jar;lib/jcifs-1.3.17.jar;lib/jcl-over-slf4j-1.7.2.jar;lib/jempbox-1.8.4.jar;lib/jetty-client-8.1.14.v20131031.jar;lib/jetty-continuation-8.1.14.v20131031.jar;lib/jetty-http-8.1.14.v20131031.jar;lib/jetty-io-8.1.14.v20131031.jar;lib/jetty-security-8.1.14.v20131031.jar;lib/jetty-server-8.1.14.v20131031.jar;lib/jetty-servlet-8.1.14.v20131031.jar;lib/jetty-servlets-8.1.14.v20131031.jar;lib/jetty-util-8.1.14.v20131031.jar;lib/jetty-webapp-8.1.14.v20131031.jar;lib/jetty-xml-8.1.14.v20131031.jar;lib/jsch-0.1.50.jar;lib/json-simple-1.1.1.jar;lib/jsoup-1.6.3.jar;lib/log4j-over-slf4j-1.7.2.jar;lib/lucene-analyzers-common-4.7.1.jar;lib/lucene-analyzers-phonetic-4.7.1.jar;lib/lucene-classification-4.7.1.jar;lib/lucene-codecs-4.7.1.jar;lib/lucene-core-4.7.1.jar;lib/lucene-facet-4.7.1.jar;lib/lucene-grouping-4.7.1.jar;lib/lucene-highlighter-4.7.1.jar;lib/lucene-join-4.7.1.jar;lib/lucene-memory-4.7.1.jar;lib/lucene-misc-4.7.1.jar;lib/lucene-queries-4.7.1.jar;lib/lucene-queryparser-4.7.1.jar;lib/lucene-spatial-4.7.1.jar;lib/lucene-suggest-4.7.1.jar;lib/metadata-extractor-2.6.2.jar;lib/noggit-0.5.jar;lib/pdfbox-1.8.4.jar;lib/poi-3.9-20121203.jar;lib/poi-scratchpad-3.9-20121203.jar;lib/sax-2.0.1.jar;lib/servlet-api-3.0.jar;lib/slf4j-api-1.7.2.jar;lib/slf4j-jdk14-1.7.2.jar;lib/solr-core-4.7.1.jar;lib/solr-solrj-4.7.1.jar;lib/spatial4j-0.3.jar;lib/webcat-0.1-swf.jar;lib/wstx-asl-3.2.9.jar;lib/xercesImpl.jar;lib/xml-apis.jar;lib/zookeeper-3.4.5.jar;lib/yacycore.jar
lib/yacycore.jar
- 1.6
+ 1.7
diff --git a/pom.xml b/pom.xml
index 0b2777d24..6134d2429 100644
--- a/pom.xml
+++ b/pom.xml
@@ -487,11 +487,6 @@
sax
2.0.1
-
- org.eclipse.jetty.orbit
- javax.servlet
- 3.0.0.v201112011016
-
org.slf4j
slf4j-api
@@ -516,28 +511,78 @@
slf4j-log4j12
org.slf4j
+
+ javax.servlet
+ org.eclipse.jetty.orbit
+
org.eclipse.jetty
jetty-server
- 8.1.14.v20131031
+ 9.1.4.v20140401
org.eclipse.jetty
jetty-servlet
- 8.1.14.v20131031
+ 9.1.4.v20140401
org.eclipse.jetty
jetty-servlets
- 8.1.14.v20131031
+ 9.1.4.v20140401
org.eclipse.jetty
jetty-webapp
- 8.1.14.v20131031
-
+ 9.1.4.v20140401
+
+
+ org.eclipse.jetty
+ jetty-util
+ 9.1.4.v20140401
+ jar
+
+
+ org.eclipse.jetty
+ jetty-xml
+ 9.1.4.v20140401
+
+
+ org.eclipse.jetty
+ jetty-http
+ 9.1.4.v20140401
+
+
+ org.eclipse.jetty
+ jetty-security
+ 9.1.4.v20140401
+
+
+ org.eclipse.jetty
+ jetty-io
+ 9.1.4.v20140401
+
+
+ org.eclipse.jetty
+ jetty-continuation
+ 9.1.4.v20140401
+
+
+ org.eclipse.jetty
+ jetty-jmx
+ 9.1.4.v20140401
+
+
+ org.eclipse.jetty
+ jetty-proxy
+ 9.1.4.v20140401
+
+
+ org.eclipse.jetty
+ jetty-deploy
+ 9.1.4.v20140401
+
org.codehaus.woodstox
wstx-asl
diff --git a/source/net/yacy/http/Jetty8HttpServerImpl.java b/source/net/yacy/http/Jetty9HttpServerImpl.java
similarity index 87%
rename from source/net/yacy/http/Jetty8HttpServerImpl.java
rename to source/net/yacy/http/Jetty9HttpServerImpl.java
index 41ce610c2..7d92c549b 100644
--- a/source/net/yacy/http/Jetty8HttpServerImpl.java
+++ b/source/net/yacy/http/Jetty9HttpServerImpl.java
@@ -1,5 +1,5 @@
//
-// Jetty8HttpServerImpl
+// Jetty9HttpServerImpl
// Copyright 2011 by Florian Richter
// First released 13.04.2011 at http://yacy.net
//
@@ -35,68 +35,75 @@ import java.net.SocketException;
import java.security.KeyStore;
import java.util.Enumeration;
import java.util.StringTokenizer;
-
import javax.net.ssl.KeyManagerFactory;
import javax.net.ssl.SSLContext;
-
import net.yacy.cora.util.ConcurrentLog;
-import net.yacy.http.servlets.GSAsearchServlet;
-import net.yacy.http.servlets.SolrSelectServlet;
-import net.yacy.http.servlets.SolrServlet;
import net.yacy.http.servlets.YaCyDefaultServlet;
import net.yacy.search.Switchboard;
import net.yacy.search.SwitchboardConstants;
import net.yacy.utils.PKCS12Tool;
-
+import org.eclipse.jetty.http.HttpVersion;
+import org.eclipse.jetty.proxy.ConnectHandler;
import org.eclipse.jetty.server.Connector;
import org.eclipse.jetty.server.Handler;
+import org.eclipse.jetty.server.HttpConfiguration;
+import org.eclipse.jetty.server.HttpConnectionFactory;
+import org.eclipse.jetty.server.SecureRequestCustomizer;
import org.eclipse.jetty.server.Server;
-import org.eclipse.jetty.server.handler.ConnectHandler;
+import org.eclipse.jetty.server.ServerConnector;
+import org.eclipse.jetty.server.SslConnectionFactory;
import org.eclipse.jetty.server.handler.ContextHandler;
import org.eclipse.jetty.server.handler.ContextHandlerCollection;
import org.eclipse.jetty.server.handler.DefaultHandler;
import org.eclipse.jetty.server.handler.HandlerList;
import org.eclipse.jetty.server.handler.IPAccessHandler;
-import org.eclipse.jetty.server.nio.SelectChannelConnector;
-import org.eclipse.jetty.server.ssl.SslSelectChannelConnector;
import org.eclipse.jetty.servlet.ServletHolder;
import org.eclipse.jetty.util.resource.Resource;
import org.eclipse.jetty.util.ssl.SslContextFactory;
import org.eclipse.jetty.webapp.WebAppContext;
/**
- * class to embedded Jetty 8 http server into YaCy
+ * class to embedded Jetty 9 http server into YaCy
*/
-public class Jetty8HttpServerImpl implements YaCyHttpServer {
+public class Jetty9HttpServerImpl implements YaCyHttpServer {
private final Server server;
/**
* @param port TCP Port to listen for http requests
*/
- public Jetty8HttpServerImpl(int port) {
+ public Jetty9HttpServerImpl(int port) {
Switchboard sb = Switchboard.getSwitchboard();
server = new Server();
- SelectChannelConnector connector = new SelectChannelConnector();
+ ServerConnector connector = new ServerConnector(server);
connector.setPort(port);
connector.setName("httpd:"+Integer.toString(port));
server.addConnector(connector);
// add ssl/https connector
boolean useSSL = sb.getConfigBool("server.https", false);
+
if (useSSL) {
final SslContextFactory sslContextFactory = new SslContextFactory();
final SSLContext sslContext = initSslContext(sb);
if (sslContext != null) {
+
int sslport = sb.getConfigInt("port.ssl", 8443);
sslContextFactory.setSslContext(sslContext);
- SslSelectChannelConnector sslconnector = new SslSelectChannelConnector(sslContextFactory);
- sslconnector.setPort(sslport);
- sslconnector.setName("ssld:" + Integer.toString(sslport)); // name must start with ssl (for withSSL() to work correctly)
+ // SSL HTTP Configuration
+ HttpConfiguration https_config = new HttpConfiguration();
+ https_config.addCustomizer(new SecureRequestCustomizer());
+
+ // SSL Connector
+ ServerConnector sslConnector = new ServerConnector(server,
+ new SslConnectionFactory(sslContextFactory, HttpVersion.HTTP_1_1.asString()),
+ new HttpConnectionFactory(https_config));
+ sslConnector.setPort(sslport);
+ sslConnector.setName("ssld:" + Integer.toString(sslport)); // name must start with ssl (for withSSL() to work correctly)
- server.addConnector(sslconnector);
+ server.addConnector(sslConnector);
ConcurrentLog.info("SERVER", "SSL support initialized successfully on port " + sslport);
}
}
@@ -141,19 +148,21 @@ public class Jetty8HttpServerImpl implements YaCyHttpServer {
// to make sure they are available even if removed in individual web.xml
// additional, optional or individual servlets or servlet mappings can be set in web.xml
+ // in Jetty 9 servlet should be set only once
+ // therefore only the settings in web.xml is used
//add SolrSelectServlet
- htrootContext.addServlet(SolrSelectServlet.class, "/solr/select"); // uses the default core, collection1
- htrootContext.addServlet(SolrSelectServlet.class, "/solr/collection1/select"); // the same servlet, identifies the collection1 core using the path
- htrootContext.addServlet(SolrSelectServlet.class, "/solr/webgraph/select"); // the same servlet, identifies the webgraph core using the path
+ //htrootContext.addServlet(SolrSelectServlet.class, "/solr/select"); // uses the default core, collection1
+ //htrootContext.addServlet(SolrSelectServlet.class, "/solr/collection1/select"); // the same servlet, identifies the collection1 core using the path
+ //htrootContext.addServlet(SolrSelectServlet.class, "/solr/webgraph/select"); // the same servlet, identifies the webgraph core using the path
- htrootContext.addServlet(SolrServlet.class, "/solr/collection1/admin/luke");
- htrootContext.addServlet(SolrServlet.class, "/solr/webgraph/admin/luke");
+ //htrootContext.addServlet(SolrServlet.class, "/solr/collection1/admin/luke");
+ //htrootContext.addServlet(SolrServlet.class, "/solr/webgraph/admin/luke");
// add proxy?url= servlet
//htrootContext.addServlet(YaCyProxyServlet.class,"/proxy.html");
// add GSA servlet
- htrootContext.addServlet(GSAsearchServlet.class,"/gsa/search");
+ //htrootContext.addServlet(GSAsearchServlet.class,"/gsa/search");
// --- eof default servlet mappings --------------------------------------------
// define list of YaCy specific general handlers
@@ -180,7 +189,7 @@ public class Jetty8HttpServerImpl implements YaCyHttpServer {
// changes will ivalidate all current existing user-password-hashes (from userDB)
loginService.setName(sb.getConfig(SwitchboardConstants.ADMIN_REALM,"YaCy"));
- Jetty8YaCySecurityHandler securityHandler = new Jetty8YaCySecurityHandler();
+ Jetty9YaCySecurityHandler securityHandler = new Jetty9YaCySecurityHandler();
securityHandler.setLoginService(loginService);
htrootContext.setSecurityHandler(securityHandler);
@@ -219,7 +228,7 @@ public class Jetty8HttpServerImpl implements YaCyHttpServer {
@Override
public void startupServer() throws Exception {
// option to finish running requests on shutdown
- server.setGracefulShutdown(3000);
+// server.setGracefulShutdown(3000);
server.setStopAtShutdown(true);
server.start();
}
@@ -258,7 +267,10 @@ public class Jetty8HttpServerImpl implements YaCyHttpServer {
public int getSslPort() {
Connector[] clist = server.getConnectors();
for (Connector c:clist) {
- if (c.getName().startsWith("ssl")) return c.getPort();
+ if (c.getName().startsWith("ssl")) {
+ int port =((ServerConnector)c).getLocalPort();
+ return port;
+ }
}
return -1;
}
@@ -290,25 +302,25 @@ public class Jetty8HttpServerImpl implements YaCyHttpServer {
final int sslport = Switchboard.getSwitchboard().getConfigInt("port.ssl", 8443);
for (Connector con : cons) {
// check http connector
- if (con.getName().startsWith("httpd") && con.getPort() != port) {
- con.close();
+ if (con.getName().startsWith("httpd") && ((ServerConnector)con).getPort() != port) {
+ ((ServerConnector)con).close();
con.stop();
if (!con.isStopped()) {
ConcurrentLog.warn("SERVER", "Reconnect: Jetty Connector failed to stop");
}
- con.setPort(port);
+ ((ServerConnector)con).setPort(port);
con.start();
ConcurrentLog.info("SERVER", "set new port for Jetty connector " + con.getName());
continue;
}
// check https connector
- if (con.getName().startsWith("ssl") && con.getPort() != sslport) {
- con.close();
+ if (con.getName().startsWith("ssl") && ((ServerConnector)con).getPort() != sslport) {
+ ((ServerConnector)con).close();
con.stop();
if (!con.isStopped()) {
ConcurrentLog.warn("SERVER", "Reconnect: Jetty Connector failed to stop");
}
- con.setPort(sslport);
+ ((ServerConnector)con).setPort(sslport);
con.start();
ConcurrentLog.info("SERVER", "set new port for Jetty connector " + con.getName());
}
@@ -326,7 +338,7 @@ public class Jetty8HttpServerImpl implements YaCyHttpServer {
* @param username
*/
public void resetUser(String username) {
- Jetty8YaCySecurityHandler hx = this.server.getChildHandlerByClass(Jetty8YaCySecurityHandler.class);
+ Jetty9YaCySecurityHandler hx = this.server.getChildHandlerByClass(Jetty9YaCySecurityHandler.class);
if (hx != null) {
YaCyLoginService loginservice = (YaCyLoginService) hx.getLoginService();
loginservice.loadUser(username);
@@ -338,7 +350,7 @@ public class Jetty8HttpServerImpl implements YaCyHttpServer {
* @param username
*/
public void removeUser(String username) {
- Jetty8YaCySecurityHandler hx = this.server.getChildHandlerByClass(Jetty8YaCySecurityHandler.class);
+ Jetty9YaCySecurityHandler hx = this.server.getChildHandlerByClass(Jetty9YaCySecurityHandler.class);
if (hx != null) {
YaCyLoginService loginservice = (YaCyLoginService) hx.getLoginService();
loginservice.removeUser(username);
diff --git a/source/net/yacy/http/Jetty8YaCySecurityHandler.java b/source/net/yacy/http/Jetty9YaCySecurityHandler.java
similarity index 90%
rename from source/net/yacy/http/Jetty8YaCySecurityHandler.java
rename to source/net/yacy/http/Jetty9YaCySecurityHandler.java
index 7b002782c..af3f94d44 100644
--- a/source/net/yacy/http/Jetty8YaCySecurityHandler.java
+++ b/source/net/yacy/http/Jetty9YaCySecurityHandler.java
@@ -25,14 +25,12 @@
package net.yacy.http;
import java.net.MalformedURLException;
-
import net.yacy.cora.document.id.MultiProtocolURL;
import net.yacy.cora.protocol.Domains;
import net.yacy.data.UserDB.AccessRight;
import net.yacy.search.Switchboard;
import net.yacy.search.SwitchboardConstants;
import net.yacy.server.serverAccessTracker;
-
import org.eclipse.jetty.security.ConstraintSecurityHandler;
import org.eclipse.jetty.security.RoleInfo;
import org.eclipse.jetty.server.Request;
@@ -42,16 +40,8 @@ import org.eclipse.jetty.server.Request;
* demands authentication for pages with _p. inside
* and updates AccessTracker
*/
-public class Jetty8YaCySecurityHandler extends ConstraintSecurityHandler {
+public class Jetty9YaCySecurityHandler extends ConstraintSecurityHandler {
- public Jetty8YaCySecurityHandler() {
- super();
-
- for (AccessRight right : AccessRight.values()) {
- addRole(right.toString()); // add default YaCy roles
- }
- }
-
/**
* create the constraint for the given path
* for urls containing *_p. (like info_p.html) admin access is required,
@@ -67,7 +57,6 @@ public class Jetty8YaCySecurityHandler extends ConstraintSecurityHandler {
final Switchboard sb = Switchboard.getSwitchboard();
final boolean adminAccountGrantedForLocalhost = sb.getConfigBool(SwitchboardConstants.ADMIN_ACCOUNT_FOR_LOCALHOST, false);
final boolean adminAccountNeededForAllPages = sb.getConfigBool(SwitchboardConstants.ADMIN_ACCOUNT_All_PAGES, false);
- //final String adminAccountBase64MD5 = sb.getConfig(YaCyLegacyCredential.ADMIN_ACCOUNT_B64MD5, "");
String refererHost;
// update AccessTracker
@@ -87,7 +76,6 @@ public class Jetty8YaCySecurityHandler extends ConstraintSecurityHandler {
if (!protectedPage && !sb.getConfigBool(SwitchboardConstants.PUBLIC_SEARCHPAGE, true)) {
protectedPage = pathInContext.startsWith("/solr/") || pathInContext.startsWith("/gsa/");
}
- //final boolean accountEmpty = adminAccountBase64MD5.length() == 0;
if (protectedPage) {
if (grantedForLocalhost) {
diff --git a/source/net/yacy/http/servlets/UrlProxyServlet.java b/source/net/yacy/http/servlets/UrlProxyServlet.java
index f9a7cb9e6..f6f7542e9 100644
--- a/source/net/yacy/http/servlets/UrlProxyServlet.java
+++ b/source/net/yacy/http/servlets/UrlProxyServlet.java
@@ -32,7 +32,7 @@ import net.yacy.server.http.HTTPDProxyHandler;
import org.eclipse.jetty.continuation.Continuation;
import org.eclipse.jetty.continuation.ContinuationSupport;
import org.eclipse.jetty.http.HttpURI;
-import org.eclipse.jetty.servlets.ProxyServlet;
+import org.eclipse.jetty.proxy.ProxyServlet;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
@@ -82,7 +82,7 @@ public class UrlProxyServlet extends ProxyServlet implements Servlet {
super.init(config);
// must be lower case (header names are internally converted to lower)
- _DontProxyHeaders.add("host"); // to prevent Host header setting from original servletrequest (which is localhost)
+ //_DontProxyHeaders.add("host"); // to prevent Host header setting from original servletrequest (which is localhost)
String tmps = config.getInitParameter("stopProxyText");
if (tmps != null) {
_stopProxyText = tmps;
@@ -112,9 +112,9 @@ public class UrlProxyServlet extends ProxyServlet implements Servlet {
}
}
- if ("CONNECT".equalsIgnoreCase(request.getMethod())) {
+ /* if ("CONNECT".equalsIgnoreCase(request.getMethod())) {
handleConnect(request, response);
- } else {
+ } else */{
final Continuation continuation = ContinuationSupport.getContinuation(request);
@@ -201,7 +201,7 @@ public class UrlProxyServlet extends ProxyServlet implements Servlet {
response.setStatus(httpStatus);
response.setContentType(mimeType);
- if ((httpStatus == HttpServletResponse.SC_OK) && (mimeType != null) && mimeType.startsWith("text")) {
+ if ((httpStatus < HttpServletResponse.SC_BAD_REQUEST) && (mimeType != null) && mimeType.startsWith("text")) {
if (proxyResponseHeader.containsKey(HeaderFramework.TRANSFER_ENCODING) && proxyResponseHeader.get(HeaderFramework.TRANSFER_ENCODING).contains("chunked")) {
proxyout = new ChunkedInputStream(proxyout);
}
@@ -280,6 +280,10 @@ public class UrlProxyServlet extends ProxyServlet implements Servlet {
response.getOutputStream().write(sbb);
} else {
+ if (httpStatus >= HttpServletResponse.SC_BAD_REQUEST) {
+ response.sendError(httpStatus,"Site " + proxyurl + " returned with status");
+ return;
+ }
if ((response.getHeader(HeaderFramework.CONTENT_LENGTH) == null) && prop.containsKey(HeaderFramework.CONNECTION_PROP_PROXY_RESPOND_SIZE)) {
response.setHeader(HeaderFramework.CONTENT_LENGTH, (String) prop.get(HeaderFramework.CONNECTION_PROP_PROXY_RESPOND_SIZE));
}
@@ -334,7 +338,7 @@ public class UrlProxyServlet extends ProxyServlet implements Servlet {
* @return destination url from query parameter &url=_destinationurl_
* @throws MalformedURLException
*/
- @Override
+/* @Override
protected HttpURI proxyHttpURI(HttpServletRequest request, String uri) throws MalformedURLException {
String strARGS = request.getQueryString();
if (strARGS.startsWith("url=")) {
@@ -353,7 +357,7 @@ public class UrlProxyServlet extends ProxyServlet implements Servlet {
}
return null;
}
-
+*/
@Override
public String getServletInfo() {
return "YaCy Proxy Servlet";
diff --git a/source/net/yacy/http/servlets/YaCyDefaultServlet.java b/source/net/yacy/http/servlets/YaCyDefaultServlet.java
index ad90db7c9..6b07c9587 100644
--- a/source/net/yacy/http/servlets/YaCyDefaultServlet.java
+++ b/source/net/yacy/http/servlets/YaCyDefaultServlet.java
@@ -38,7 +38,7 @@ import java.util.Iterator;
import java.util.List;
import java.util.concurrent.ConcurrentHashMap;
import java.util.zip.GZIPInputStream;
-
+import javax.servlet.ReadListener;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
@@ -48,7 +48,6 @@ import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequestWrapper;
import javax.servlet.http.HttpServletResponse;
-
import net.yacy.cora.date.GenericFormatter;
import net.yacy.cora.document.analysis.Classification;
import net.yacy.cora.protocol.HeaderFramework;
@@ -73,15 +72,18 @@ import net.yacy.server.serverObjects;
import net.yacy.server.serverSwitch;
import net.yacy.server.servletProperties;
import net.yacy.visualization.RasterPlotter;
-
import org.apache.commons.fileupload.FileItem;
import org.apache.commons.fileupload.FileItemFactory;
import org.apache.commons.fileupload.disk.DiskFileItemFactory;
import org.apache.commons.fileupload.servlet.ServletFileUpload;
-import org.eclipse.jetty.http.HttpHeaders;
-import org.eclipse.jetty.http.HttpMethods;
+import static org.eclipse.jetty.http.HttpHeader.CONTENT_RANGE;
+import static org.eclipse.jetty.http.HttpHeader.IF_MODIFIED_SINCE;
+import static org.eclipse.jetty.http.HttpHeader.IF_UNMODIFIED_SINCE;
+import static org.eclipse.jetty.http.HttpHeader.REQUEST_RANGE;
+import static org.eclipse.jetty.http.HttpMethod.HEAD;
import org.eclipse.jetty.http.MimeTypes;
-import org.eclipse.jetty.io.Buffer;
+import static org.eclipse.jetty.http.MimeTypes.Type.TEXT_HTML;
+import static org.eclipse.jetty.http.MimeTypes.Type.TEXT_HTML_UTF_8;
import org.eclipse.jetty.io.WriterOutputStream;
import org.eclipse.jetty.server.InclusiveByteRange;
import org.eclipse.jetty.util.MultiPartOutputStream;
@@ -357,7 +359,7 @@ public class YaCyDefaultServlet extends HttpServlet {
}
}
}
-
+
/* ------------------------------------------------------------ */
@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response)
@@ -409,12 +411,12 @@ public class YaCyDefaultServlet extends HttpServlet {
protected boolean passConditionalHeaders(HttpServletRequest request, HttpServletResponse response, Resource resource)
throws IOException {
try {
- if (!request.getMethod().equals(HttpMethods.HEAD)) {
+ if (!request.getMethod().equals(HEAD.asString())) {
- String ifms = request.getHeader(HttpHeaders.IF_MODIFIED_SINCE);
+ String ifms = request.getHeader(IF_MODIFIED_SINCE.asString());
if (ifms != null) {
- long ifmsl = request.getDateHeader(HttpHeaders.IF_MODIFIED_SINCE);
+ long ifmsl = request.getDateHeader(IF_MODIFIED_SINCE.asString());
if (ifmsl != -1) {
if (resource.lastModified() / 1000 <= ifmsl / 1000) {
response.reset();
@@ -426,7 +428,7 @@ public class YaCyDefaultServlet extends HttpServlet {
}
// Parse the if[un]modified dates and compare to resource
- long date = request.getDateHeader(HttpHeaders.IF_UNMODIFIED_SINCE);
+ long date = request.getDateHeader(IF_UNMODIFIED_SINCE.asString());
if (date != -1) {
if (resource.lastModified() / 1000 > date / 1000) {
@@ -464,7 +466,7 @@ public class YaCyDefaultServlet extends HttpServlet {
}
byte[] data = dir.getBytes("UTF-8");
- response.setContentType(MimeTypes.TEXT_HTML_UTF_8);
+ response.setContentType(TEXT_HTML_UTF_8.asString());
response.setContentLength(data.length);
response.getOutputStream().write(data);
}
@@ -510,10 +512,10 @@ public class YaCyDefaultServlet extends HttpServlet {
List> ranges = InclusiveByteRange.satisfiableRanges(reqRanges, content_length);
// if there are no satisfiable ranges, send 416 response
- if (ranges == null || ranges.size() == 0) {
+ if (ranges == null || ranges.isEmpty()) {
writeHeaders(response, resource, content_length);
response.setStatus(HttpServletResponse.SC_REQUESTED_RANGE_NOT_SATISFIABLE);
- response.setHeader(HttpHeaders.CONTENT_RANGE,
+ response.setHeader(CONTENT_RANGE.asString(),
InclusiveByteRange.to416HeaderRangeString(content_length));
resource.writeTo(out, 0, content_length);
out.close();
@@ -528,7 +530,7 @@ public class YaCyDefaultServlet extends HttpServlet {
long singleLength = singleSatisfiableRange.getSize(content_length);
writeHeaders(response, resource, singleLength);
response.setStatus(HttpServletResponse.SC_PARTIAL_CONTENT);
- response.setHeader(HttpHeaders.CONTENT_RANGE,
+ response.setHeader(CONTENT_RANGE.asString(),
singleSatisfiableRange.toHeaderRangeString(content_length));
resource.writeTo(out, singleSatisfiableRange.getFirst(content_length), singleLength);
out.close();
@@ -551,7 +553,7 @@ public class YaCyDefaultServlet extends HttpServlet {
// send an old style multipart/x-byteranges Content-Type. This
// keeps Netscape and acrobat happy. This is what Apache does.
String ctp;
- if (request.getHeader(HttpHeaders.REQUEST_RANGE) != null) {
+ if (request.getHeader(REQUEST_RANGE.asString()) != null) {
ctp = "multipart/x-byteranges; boundary=";
} else {
ctp = "multipart/byteranges; boundary=";
@@ -612,9 +614,9 @@ public class YaCyDefaultServlet extends HttpServlet {
/* ------------------------------------------------------------ */
protected void writeHeaders(HttpServletResponse response, Resource resource, long count) {
if (response.getContentType() == null) {
- Buffer extensionmime;
+ final String extensionmime;
if ((extensionmime = _mimeTypes.getMimeByExtension(resource.getName())) != null) {
- response.setContentType(extensionmime.toString());
+ response.setContentType(extensionmime);
}
}
@@ -795,13 +797,7 @@ public class YaCyDefaultServlet extends HttpServlet {
} else {
tmp = invokeServlet(targetClass, legacyRequestHeader, args);
}
- } catch (InvocationTargetException e) {
- ConcurrentLog.logException(e);
- throw new ServletException(targetFile.getAbsolutePath());
- } catch (IllegalArgumentException e) {
- ConcurrentLog.logException(e);
- throw new ServletException(targetFile.getAbsolutePath());
- } catch (IllegalAccessException e) {
+ } catch (InvocationTargetException | IllegalArgumentException | IllegalAccessException e) {
ConcurrentLog.logException(e);
throw new ServletException(targetFile.getAbsolutePath());
}
@@ -834,7 +830,7 @@ public class YaCyDefaultServlet extends HttpServlet {
result = RasterPlotter.exportImage(bi, targetExt);
}
- final String mimeType = Classification.ext2mime(targetExt, MimeTypes.TEXT_HTML);
+ final String mimeType = Classification.ext2mime(targetExt, TEXT_HTML.asString());
response.setContentType(mimeType);
response.setContentLength(result.length());
response.setStatus(HttpServletResponse.SC_OK);
@@ -894,14 +890,14 @@ public class YaCyDefaultServlet extends HttpServlet {
templatePatterns.putHTML("newpeer_peerhash", myPeer.hash);
templatePatterns.put("navigation-p2p", sb.getConfigBool(SwitchboardConstants.DHT_ENABLED, true) || !sb.isRobinsonMode() ? 1 : 0);
String submitted = sb.getConfig("server.servlets.submitted", "");
- boolean crawler_enabled = submitted.indexOf("Crawler_p") >= 0;
- boolean advanced_enabled = crawler_enabled || submitted.indexOf("ConfigBasic") >= 0 || submitted.indexOf("CrawlStart") >= 0;
+ boolean crawler_enabled = submitted.contains("Crawler_p");
+ boolean advanced_enabled = crawler_enabled || submitted.contains("ConfigBasic") || submitted.contains("CrawlStart");
templatePatterns.put("navigation-crawlmonitor", crawler_enabled);
templatePatterns.put("navigation-advanced", advanced_enabled);
templatePatterns.put(SwitchboardConstants.GREETING_HOMEPAGE, sb.getConfig(SwitchboardConstants.GREETING_HOMEPAGE, ""));
templatePatterns.put(SwitchboardConstants.GREETING_SMALL_IMAGE, sb.getConfig(SwitchboardConstants.GREETING_SMALL_IMAGE, ""));
- String mimeType = Classification.ext2mime(targetExt, MimeTypes.TEXT_HTML);
+ String mimeType = Classification.ext2mime(targetExt, TEXT_HTML.asString());
InputStream fis;
long fileSize = targetFile.length();
@@ -926,9 +922,9 @@ public class YaCyDefaultServlet extends HttpServlet {
}
}
- private static final String appendPath(String proplist, String path) {
+ private static String appendPath(String proplist, String path) {
if (proplist.length() == 0) return path;
- if (proplist.indexOf(path) >= 0) return proplist;
+ if (proplist.contains(path)) return proplist;
return proplist + "," + path;
}
@@ -1057,5 +1053,28 @@ public class YaCyDefaultServlet extends HttpServlet {
public void close() throws IOException {
in.close();
}
+
+ @Override
+ public boolean isFinished() {
+ try {
+ return (in.available() < 1);
+ } catch (IOException ex) {
+ return true;
+ }
+ }
+
+ @Override
+ public boolean isReady() {
+ try {
+ return in.available() > 0;
+ } catch (IOException ex) {
+ return false;
+ }
+ }
+
+ @Override
+ public void setReadListener(ReadListener rl) {
+ // TODO: implement
+ }
}
}
diff --git a/source/net/yacy/http/servlets/YaCyProxyServlet.java b/source/net/yacy/http/servlets/YaCyProxyServlet.java
index b1ee93a5a..44ce2168a 100644
--- a/source/net/yacy/http/servlets/YaCyProxyServlet.java
+++ b/source/net/yacy/http/servlets/YaCyProxyServlet.java
@@ -39,7 +39,7 @@ import net.yacy.server.http.HTTPDProxyHandler;
import org.eclipse.jetty.continuation.Continuation;
import org.eclipse.jetty.continuation.ContinuationSupport;
import org.eclipse.jetty.http.HttpURI;
-import org.eclipse.jetty.servlets.ProxyServlet;
+import org.eclipse.jetty.proxy.ProxyServlet;
/**
* Servlet to implement proxy via url parameter "/proxy.html?url=xyz_urltoproxy"
@@ -65,7 +65,7 @@ public class YaCyProxyServlet extends ProxyServlet implements Servlet {
super.init(config);
// must be lower case (header names are internally converted to lower)
- _DontProxyHeaders.add("host"); // to prevent Host header setting from original servletrequest (which is localhost)
+ //_DontProxyHeaders.add("host"); // to prevent Host header setting from original servletrequest (which is localhost)
}
/* ------------------------------------------------------------ */
@@ -90,9 +90,8 @@ public class YaCyProxyServlet extends ProxyServlet implements Servlet {
}
}
- if ("CONNECT".equalsIgnoreCase(request.getMethod())) {
- handleConnect(request, response);
- } else {
+/* handleConnect(request, response);
+ } else*/ {
final Continuation continuation = ContinuationSupport.getContinuation(request);
@@ -342,7 +341,7 @@ public class YaCyProxyServlet extends ProxyServlet implements Servlet {
* @return destination url from query parameter &url=_destinationurl_
* @throws MalformedURLException
*/
- @Override
+/* @Override
protected HttpURI proxyHttpURI(HttpServletRequest request, String uri) throws MalformedURLException {
String strARGS = request.getQueryString();
if (strARGS.startsWith("url=")) {
@@ -361,7 +360,7 @@ public class YaCyProxyServlet extends ProxyServlet implements Servlet {
}
return null;
}
-
+*/
@Override
public String getServletInfo() {
return "YaCy Proxy Servlet";
diff --git a/source/net/yacy/yacy.java b/source/net/yacy/yacy.java
index 1a1379dbe..dac720ff3 100644
--- a/source/net/yacy/yacy.java
+++ b/source/net/yacy/yacy.java
@@ -38,9 +38,8 @@ import java.io.RandomAccessFile;
import java.nio.channels.FileChannel;
import java.nio.channels.FileLock;
import java.util.Properties;
-import java.util.concurrent.Semaphore;
import java.util.concurrent.ExecutionException;
-
+import java.util.concurrent.Semaphore;
import net.yacy.cora.date.GenericFormatter;
import net.yacy.cora.protocol.ClientIdentification;
import net.yacy.cora.protocol.RequestHeader;
@@ -51,8 +50,8 @@ import net.yacy.cora.util.ConcurrentLog;
import net.yacy.data.Translator;
import net.yacy.gui.YaCyApp;
import net.yacy.gui.framework.Browser;
+import net.yacy.http.Jetty9HttpServerImpl;
import net.yacy.http.YaCyHttpServer;
-import net.yacy.http.Jetty8HttpServerImpl;
import net.yacy.kelondro.util.FileUtils;
import net.yacy.kelondro.util.Formatter;
import net.yacy.kelondro.util.MemoryControl;
@@ -286,7 +285,7 @@ public final class yacy {
try {
// start http server
YaCyHttpServer httpServer;
- httpServer = new Jetty8HttpServerImpl(port);
+ httpServer = new Jetty9HttpServerImpl(port);
httpServer.startupServer();
sb.setHttpServer(httpServer);
ConcurrentLog.info("STARTUP",httpServer.getVersion());