aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2014-04-25 09:02:12 +0100
committerLouise Crow <louise.crow@gmail.com>2014-04-25 09:02:12 +0100
commitcc846cb49d8e99e0ca183cef8c73df8b8af6b39b (patch)
treeb1280d75515a4648e4786233b774ecade87d0cd1 /lib
parentede46dc8dc6c97cdad8c3fcb3bd42ede5c25f395 (diff)
Fix for badly-formed content-disposition header.
Taken from https://github.com/mikel/mail/pull/602
Diffstat (limited to 'lib')
-rw-r--r--lib/mail_handler/backends/mail_extensions.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/mail_handler/backends/mail_extensions.rb b/lib/mail_handler/backends/mail_extensions.rb
index 87af526bf..a277f540d 100644
--- a/lib/mail_handler/backends/mail_extensions.rb
+++ b/lib/mail_handler/backends/mail_extensions.rb
@@ -9,6 +9,12 @@ module Mail
attr_accessor :count_first_uudecode_count
end
+ class Part < Message
+ def inline?
+ header[:content_disposition].disposition_type == 'inline' if header[:content_disposition] rescue false
+ end
+ end
+
# A patched version of the parameter hash that handles nil values without throwing
# an error.
class ParameterHash < IndifferentHash