Add a fix from Tomcat's DefaultServlet that I missed in the previous commit:
authorpastith <devnull@localhost>
Wed, 20 May 2009 12:16:08 +0000 (12:16 +0000)
committerpastith <devnull@localhost>
Wed, 20 May 2009 12:16:08 +0000 (12:16 +0000)
- Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=45419
Set Accept-Ranges for static resources served by DefaultServlet

This brings us up to date with tomcat trunk r708151.

gss/src/gr/ebs/gss/server/webdav/Webdav.java

index b9df77d..7074bc3 100644 (file)
@@ -2323,6 +2323,8 @@ public class Webdav extends HttpServlet {
                long contentLength = -1L;
 
                if (file != null) {
+                       // Accept ranges header
+                       resp.setHeader("Accept-Ranges", "bytes");
                        // Parse range specifier
                        ranges = parseRange(req, resp, file, null);
                        // ETag header
@@ -2651,8 +2653,7 @@ public class Webdav extends HttpServlet {
                                                oldBody.getAuditInfo().getModificationDate().getTime();
                        if (headerValue != -1)
                                // If an If-None-Match header has been specified, if modified
-                               // since
-                               // is ignored.
+                               // since is ignored.
                                if (request.getHeader("If-None-Match") == null && lastModified < headerValue + 1000) {
                                        // The entity has not been modified since the date
                                        // specified by the client. This is not an error case.