- 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.
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
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.