]> source.dussan.org Git - redmine.git/commitdiff
Merged r19365 from trunk to 4.1-stable (#20277).
authorGo MAEDA <maeda@farend.jp>
Thu, 12 Dec 2019 14:52:03 +0000 (14:52 +0000)
committerGo MAEDA <maeda@farend.jp>
Thu, 12 Dec 2019 14:52:03 +0000 (14:52 +0000)
git-svn-id: http://svn.redmine.org/redmine/branches/4.1-stable@19366 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/attachments_controller.rb

index a46e551bf13e4b77974f2ac0fbec4a69bd49ae1f..4a880793e128b1147cf278a4f0b5c7567aa82cdc 100644 (file)
@@ -70,7 +70,7 @@ class AttachmentsController < ApplicationController
       @attachment.increment_download
     end
 
-    if stale?(:etag => @attachment.digest)
+    if stale?(:etag => @attachment.digest, :template => false)
       # images are sent inline
       send_file @attachment.diskfile, :filename => filename_for_content_disposition(@attachment.filename),
                                       :type => detect_content_type(@attachment),
@@ -80,7 +80,7 @@ class AttachmentsController < ApplicationController
 
   def thumbnail
     if @attachment.thumbnailable? && tbnail = @attachment.thumbnail(:size => params[:size])
-      if stale?(:etag => tbnail)
+      if stale?(:etag => tbnail, :template => false)
         send_file(
           tbnail,
           :filename => filename_for_content_disposition(@attachment.filename),