diff --git a/.classpath b/.classpath index e4b086f62..f8bb61f36 100644 --- a/.classpath +++ b/.classpath @@ -43,20 +43,20 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + diff --git a/build.xml b/build.xml index 07bf30317..757e7c0af 100644 --- a/build.xml +++ b/build.xml @@ -202,20 +202,20 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + diff --git a/lib/jetty-client-9.4.9.v20180320.jar b/lib/jetty-client-9.4.11.v20180605.jar similarity index 67% rename from lib/jetty-client-9.4.9.v20180320.jar rename to lib/jetty-client-9.4.11.v20180605.jar index 12a58a916..603fd2f5b 100644 Binary files a/lib/jetty-client-9.4.9.v20180320.jar and b/lib/jetty-client-9.4.11.v20180605.jar differ diff --git a/lib/jetty-continuation-9.4.9.v20180320.jar b/lib/jetty-continuation-9.4.11.v20180605.jar similarity index 74% rename from lib/jetty-continuation-9.4.9.v20180320.jar rename to lib/jetty-continuation-9.4.11.v20180605.jar index 1bb996abf..f8dba29c9 100644 Binary files a/lib/jetty-continuation-9.4.9.v20180320.jar and b/lib/jetty-continuation-9.4.11.v20180605.jar differ diff --git a/lib/jetty-deploy-9.4.9.v20180320.jar b/lib/jetty-deploy-9.4.11.v20180605.jar similarity index 83% rename from lib/jetty-deploy-9.4.9.v20180320.jar rename to lib/jetty-deploy-9.4.11.v20180605.jar index cec8e6c32..5638d57e5 100644 Binary files a/lib/jetty-deploy-9.4.9.v20180320.jar and b/lib/jetty-deploy-9.4.11.v20180605.jar differ diff --git a/lib/jetty-http-9.4.9.v20180320.jar b/lib/jetty-http-9.4.11.v20180605.jar similarity index 60% rename from lib/jetty-http-9.4.9.v20180320.jar rename to lib/jetty-http-9.4.11.v20180605.jar index c4ed2e2c7..8d50fc2f1 100644 Binary files a/lib/jetty-http-9.4.9.v20180320.jar and b/lib/jetty-http-9.4.11.v20180605.jar differ diff --git a/lib/jetty-io-9.4.9.v20180320.jar b/lib/jetty-io-9.4.11.v20180605.jar similarity index 70% rename from lib/jetty-io-9.4.9.v20180320.jar rename to lib/jetty-io-9.4.11.v20180605.jar index 143b16c4b..9e6d05f46 100644 Binary files a/lib/jetty-io-9.4.9.v20180320.jar and b/lib/jetty-io-9.4.11.v20180605.jar differ diff --git a/lib/jetty-jmx-9.4.11.v20180605.jar b/lib/jetty-jmx-9.4.11.v20180605.jar new file mode 100644 index 000000000..6882e827a Binary files /dev/null and b/lib/jetty-jmx-9.4.11.v20180605.jar differ diff --git a/lib/jetty-jmx-9.4.9.v20180320.jar b/lib/jetty-jmx-9.4.9.v20180320.jar deleted file mode 100644 index c0a27c627..000000000 Binary files a/lib/jetty-jmx-9.4.9.v20180320.jar and /dev/null differ diff --git a/lib/jetty-proxy-9.4.9.v20180320.jar b/lib/jetty-proxy-9.4.11.v20180605.jar similarity index 83% rename from lib/jetty-proxy-9.4.9.v20180320.jar rename to lib/jetty-proxy-9.4.11.v20180605.jar index d77519e23..813c3c48f 100644 Binary files a/lib/jetty-proxy-9.4.9.v20180320.jar and b/lib/jetty-proxy-9.4.11.v20180605.jar differ diff --git a/lib/jetty-security-9.4.9.v20180320.jar b/lib/jetty-security-9.4.11.v20180605.jar similarity index 83% rename from lib/jetty-security-9.4.9.v20180320.jar rename to lib/jetty-security-9.4.11.v20180605.jar index c54f9ec76..e50841774 100644 Binary files a/lib/jetty-security-9.4.9.v20180320.jar and b/lib/jetty-security-9.4.11.v20180605.jar differ diff --git a/lib/jetty-server-9.4.9.v20180320.jar b/lib/jetty-server-9.4.11.v20180605.jar similarity index 57% rename from lib/jetty-server-9.4.9.v20180320.jar rename to lib/jetty-server-9.4.11.v20180605.jar index 50b5f01f2..e6c8973ad 100644 Binary files a/lib/jetty-server-9.4.9.v20180320.jar and b/lib/jetty-server-9.4.11.v20180605.jar differ diff --git a/lib/jetty-servlet-9.4.9.v20180320.jar b/lib/jetty-servlet-9.4.11.v20180605.jar similarity index 67% rename from lib/jetty-servlet-9.4.9.v20180320.jar rename to lib/jetty-servlet-9.4.11.v20180605.jar index 3a1ec0eac..d18dbb5c0 100644 Binary files a/lib/jetty-servlet-9.4.9.v20180320.jar and b/lib/jetty-servlet-9.4.11.v20180605.jar differ diff --git a/lib/jetty-servlets-9.4.9.v20180320.jar b/lib/jetty-servlets-9.4.11.v20180605.jar similarity index 89% rename from lib/jetty-servlets-9.4.9.v20180320.jar rename to lib/jetty-servlets-9.4.11.v20180605.jar index 4cfa7a637..46b438366 100644 Binary files a/lib/jetty-servlets-9.4.9.v20180320.jar and b/lib/jetty-servlets-9.4.11.v20180605.jar differ diff --git a/lib/jetty-util-9.4.9.v20180320.jar b/lib/jetty-util-9.4.11.v20180605.jar similarity index 73% rename from lib/jetty-util-9.4.9.v20180320.jar rename to lib/jetty-util-9.4.11.v20180605.jar index 9c4975bfd..f02e95925 100644 Binary files a/lib/jetty-util-9.4.9.v20180320.jar and b/lib/jetty-util-9.4.11.v20180605.jar differ diff --git a/lib/jetty-webapp-9.4.9.v20180320.jar b/lib/jetty-webapp-9.4.11.v20180605.jar similarity index 79% rename from lib/jetty-webapp-9.4.9.v20180320.jar rename to lib/jetty-webapp-9.4.11.v20180605.jar index 3e720b0fd..761e7aea8 100644 Binary files a/lib/jetty-webapp-9.4.9.v20180320.jar and b/lib/jetty-webapp-9.4.11.v20180605.jar differ diff --git a/lib/jetty-xml-9.4.9.v20180320.jar b/lib/jetty-xml-9.4.11.v20180605.jar similarity index 76% rename from lib/jetty-xml-9.4.9.v20180320.jar rename to lib/jetty-xml-9.4.11.v20180605.jar index 192f04332..1a2b30dba 100644 Binary files a/lib/jetty-xml-9.4.9.v20180320.jar and b/lib/jetty-xml-9.4.11.v20180605.jar differ diff --git a/pom.xml b/pom.xml index fec98b108..f0dc95318 100644 --- a/pom.xml +++ b/pom.xml @@ -36,7 +36,7 @@ 6.6.3 - 9.4.9.v20180320 + 9.4.11.v20180605 ${DSTAMP} diff --git a/source/net/yacy/http/servlets/YaCyDefaultServlet.java b/source/net/yacy/http/servlets/YaCyDefaultServlet.java index 882a13e22..f72f80598 100644 --- a/source/net/yacy/http/servlets/YaCyDefaultServlet.java +++ b/source/net/yacy/http/servlets/YaCyDefaultServlet.java @@ -537,7 +537,7 @@ public class YaCyDefaultServlet extends HttpServlet { } } else { // Parse the satisfiable ranges - List ranges = InclusiveByteRange.satisfiableRanges(reqRanges, content_length); + final List ranges = InclusiveByteRange.satisfiableRanges(reqRanges, content_length); // if there are no satisfiable ranges, send 416 response if (ranges == null || ranges.isEmpty()) { @@ -553,14 +553,13 @@ public class YaCyDefaultServlet extends HttpServlet { // if there is only a single valid range (must be satisfiable // since were here now), send that range with a 216 response if (ranges.size() == 1) { - InclusiveByteRange singleSatisfiableRange = - (InclusiveByteRange) ranges.get(0); - long singleLength = singleSatisfiableRange.getSize(content_length); + final InclusiveByteRange singleSatisfiableRange = ranges.iterator().next(); + long singleLength = singleSatisfiableRange.getSize(); writeHeaders(response, resource, singleLength); response.setStatus(HttpServletResponse.SC_PARTIAL_CONTENT); response.setHeader(HttpHeader.CONTENT_RANGE.asString(), singleSatisfiableRange.toHeaderRangeString(content_length)); - resource.writeTo(out, singleSatisfiableRange.getFirst(content_length), singleLength); + resource.writeTo(out, singleSatisfiableRange.getFirst(), singleLength); out.close(); return; } @@ -595,7 +594,7 @@ public class YaCyDefaultServlet extends HttpServlet { int length = 0; String[] header = new String[ranges.size()]; for (int i = 0; i < ranges.size(); i++) { - InclusiveByteRange ibr = (InclusiveByteRange) ranges.get(i); + InclusiveByteRange ibr = ranges.get(i); header[i] = ibr.toHeaderRangeString(content_length); length += ((i > 0) ? 2 : 0) @@ -603,17 +602,17 @@ public class YaCyDefaultServlet extends HttpServlet { + (mimetype == null ? 0 : HeaderFramework.CONTENT_TYPE.length() + 2 + mimetype.length()) + 2 + HeaderFramework.CONTENT_RANGE.length() + 2 + header[i].length() + 2 + 2 - + (ibr.getLast(content_length) - ibr.getFirst(content_length)) + 1; + + (ibr.getLast() - ibr.getFirst()) + 1; } length += 2 + 2 + multi.getBoundary().length() + 2 + 2; response.setContentLength(length); for (int i = 0; i < ranges.size(); i++) { - InclusiveByteRange ibr = (InclusiveByteRange) ranges.get(i); + InclusiveByteRange ibr = ranges.get(i); multi.startPart(mimetype, new String[]{HeaderFramework.CONTENT_RANGE + ": " + header[i]}); - long start = ibr.getFirst(content_length); - long size = ibr.getSize(content_length); + long start = ibr.getFirst(); + long size = ibr.getSize(); if (in != null) { // Handle non cached resource if (start < pos) {