Stale comment removed
This commit is contained in:
parent
7eba71ca9a
commit
084df25cf7
1 changed files with 9 additions and 3 deletions
|
|
@ -342,14 +342,20 @@ public class AlbumServlet
|
|||
}
|
||||
|
||||
void handleMovie(HttpServletRequest req, HttpServletResponse res, FileEntry entry) {
|
||||
|
||||
File file = entry.getPath();
|
||||
if (notModified(req, file)) {
|
||||
res.setStatus(HttpServletResponse.SC_NOT_MODIFIED);
|
||||
res.setDateHeader("Expires", System.currentTimeMillis() + (30 * 24 * 3600 * 1000L)); // 30 days
|
||||
log.info(file.getName() + " not modified (based on date)");
|
||||
return;
|
||||
}
|
||||
try {
|
||||
String size = req.getParameter("size");
|
||||
res.setStatus(HttpServletResponse.SC_OK);
|
||||
/*
|
||||
res.setDateHeader("Last-Modified", entry.getPath().lastModified());
|
||||
res.setDateHeader("Expires", System.currentTimeMillis() + (30 * 24 * 3600 * 1000L)); // 30 days
|
||||
*/
|
||||
res.setHeader("Cache-control", "no-cache");
|
||||
// res.setHeader("Cache-control", "no-cache");
|
||||
res.setContentType("video/x-flv");
|
||||
movieCoder.stream(entry.getPath(), entry.getThumbnail(), size, res.getOutputStream());
|
||||
} catch (Exception ex) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue