summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2019-04-30 01:37:25 +0000
committerGo MAEDA <maeda@farend.jp>2019-04-30 01:37:25 +0000
commit6732ce9a93fcbd941d26579f6004e038544d5707 (patch)
treee68dada840367dd7ed58f8db0e337d58f5c82b8a /app
parentbb0918fd1427d4fa0c657930a352a0d2e8c10268 (diff)
downloadredmine-6732ce9a93fcbd941d26579f6004e038544d5707.tar.gz
redmine-6732ce9a93fcbd941d26579f6004e038544d5707.zip
Fix that Content-Type header field is empty when sending a file of unknown type (#31275).
Patch by Go MAEDA. git-svn-id: http://svn.redmine.org/redmine/trunk@18098 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r--app/controllers/attachments_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/attachments_controller.rb b/app/controllers/attachments_controller.rb
index 1f1b05899..bc558fdc0 100644
--- a/app/controllers/attachments_controller.rb
+++ b/app/controllers/attachments_controller.rb
@@ -241,7 +241,7 @@ class AttachmentsController < ApplicationController
if content_type.blank? || content_type == "application/octet-stream"
content_type = Redmine::MimeType.of(attachment.filename)
end
- content_type.to_s
+ content_type.presence || "application/octet-stream"
end
def disposition(attachment)