summaryrefslogtreecommitdiffstats
path: root/src/main/java/com/gitblit/LogoServlet.java
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2013-06-26 17:43:37 -0400
committerJames Moger <james.moger@gitblit.com>2013-06-26 17:43:37 -0400
commit61555b59c56aa913b669e26daab963a57349423c (patch)
tree942e6c4e98d4df7413fc5a4a3f0e8ce31cf8866b /src/main/java/com/gitblit/LogoServlet.java
parentc129a913c4fd64558aef4cbad41c4246f5886a97 (diff)
downloadgitblit-61555b59c56aa913b669e26daab963a57349423c.tar.gz
gitblit-61555b59c56aa913b669e26daab963a57349423c.zip
Fixed last modified caching for logo servlet
Diffstat (limited to 'src/main/java/com/gitblit/LogoServlet.java')
-rw-r--r--src/main/java/com/gitblit/LogoServlet.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/com/gitblit/LogoServlet.java b/src/main/java/com/gitblit/LogoServlet.java
index 7402fc13..166bf40f 100644
--- a/src/main/java/com/gitblit/LogoServlet.java
+++ b/src/main/java/com/gitblit/LogoServlet.java
@@ -47,7 +47,7 @@ public class LogoServlet extends HttpServlet {
protected long getLastModified(HttpServletRequest req) {
File file = GitBlit.getFileOrFolder(Keys.web.headerLogo, "${baseFolder}/logo.png");
if (file.exists()) {
- return file.lastModified();
+ return Math.max(lastModified, file.lastModified());
} else {
return lastModified;
}
@@ -65,7 +65,7 @@ public class LogoServlet extends HttpServlet {
ServletContext context = request.getSession().getServletContext();
contentType = context.getMimeType(file.getName());
response.setContentLength((int) file.length());
- response.setDateHeader("Last-Modified", file.lastModified());
+ response.setDateHeader("Last-Modified", Math.max(lastModified, file.lastModified()));
is = new FileInputStream(file);
} else {
// default logo