From 6a2d84d4223e8ccb165e4db19e1068e375bfb74c Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Wed, 28 Sep 2011 10:48:55 -0500 Subject: [PATCH] Don't send blank attachment filename --- lib/linguist/blob_helper.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/linguist/blob_helper.rb b/lib/linguist/blob_helper.rb index 8fd46759..069e7372 100644 --- a/lib/linguist/blob_helper.rb +++ b/lib/linguist/blob_helper.rb @@ -68,6 +68,8 @@ module Linguist def disposition if text? || image? 'inline' + elsif name.nil? + "attachment" else "attachment; filename=#{EscapeUtils.escape_url(pathname.basename)}" end