Permalink
Browse files

Don't send blank attachment filename

  • Loading branch information...
1 parent 6e03f95 commit 6a2d84d4223e8ccb165e4db19e1068e375bfb74c @josh josh committed Sep 28, 2011
Showing with 2 additions and 0 deletions.
  1. +2 −0 lib/linguist/blob_helper.rb
@@ -68,6 +68,8 @@ def content_type
def disposition
if text? || image?
'inline'
+ elsif name.nil?
+ "attachment"
else
"attachment; filename=#{EscapeUtils.escape_url(pathname.basename)}"
end

0 comments on commit 6a2d84d

Please sign in to comment.