aboutsummaryrefslogtreecommitdiffstats
path: root/spec/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 /spec/lib
parentede46dc8dc6c97cdad8c3fcb3bd42ede5c25f395 (diff)
Fix for badly-formed content-disposition header.
Taken from https://github.com/mikel/mail/pull/602
Diffstat (limited to 'spec/lib')
-rw-r--r--spec/lib/mail_handler/mail_handler_spec.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/lib/mail_handler/mail_handler_spec.rb b/spec/lib/mail_handler/mail_handler_spec.rb
index 49a65dade..ffc40ced9 100644
--- a/spec/lib/mail_handler/mail_handler_spec.rb
+++ b/spec/lib/mail_handler/mail_handler_spec.rb
@@ -22,6 +22,11 @@ describe 'when creating a mail object from raw data' do
mail.multipart?.should == true
end
+ it "should not fail on invalid byte sequence in content-disposition header", :focus => true do
+ part = Mail::Part.new("Content-Disposition: inline; filename=a\xB8z\r\n\r\nThis is the body text.")
+ lambda { part.inline? }.should_not raise_error
+ end
+
it 'should parse multiple to addresses with unqoted display names' do
mail = get_fixture_mail('multiple-unquoted-display-names.email')
mail.to.should == ["request-66666-caa77777@whatdotheyknow.com", "foi@example.com"]