You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2019/06/28 21:53:52 UTC
[tomcat] 01/02: Back-port clean-up
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit eed5c5c75510481396e1d60349c1cbd7eaf50f62
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Fri Jun 28 20:37:15 2019 +0100
Back-port clean-up
---
java/org/apache/catalina/servlets/DefaultServlet.java | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/java/org/apache/catalina/servlets/DefaultServlet.java b/java/org/apache/catalina/servlets/DefaultServlet.java
index e161f8b..87a9dcb 100644
--- a/java/org/apache/catalina/servlets/DefaultServlet.java
+++ b/java/org/apache/catalina/servlets/DefaultServlet.java
@@ -1487,14 +1487,17 @@ public class DefaultServlet extends HttpServlet {
long fileLength = resource.getContentLength();
- if (fileLength == 0)
+ if (fileLength == 0) {
return null;
+ }
// Retrieving the range header (if any is specified
String rangeHeader = request.getHeader("Range");
- if (rangeHeader == null)
+ if (rangeHeader == null) {
return null;
+ }
+
// bytes is the only range unit supported (and I don't see the point
// of adding new ones).
if (!rangeHeader.startsWith("bytes")) {
@@ -1582,7 +1585,7 @@ public class DefaultServlet extends HttpServlet {
* Decide which way to render. HTML or XML.
*
* @param contextPath The path
- * @param resource The resource
+ * @param resource The resource
*
* @return the input stream with the rendered output
*
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org