commit 5da23242f5fca03aaedabbf984fff1c4c602f612
parent 9467fd20f3098434e70199609c2a26a936c7a163
Author: wmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Date: Sun, 8 Jul 2007 15:27:14 +0000
minor mime fix: detect filenames without quotes around them in content-disposition
git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@485 5c8cc53c-5e98-4d25-b20a-d8db53a31250
Diffstat:
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/lib/sup/message.rb b/lib/sup/message.rb
@@ -290,7 +290,7 @@ private
filename =
## first, paw through the headers looking for a filename
if m.header["Content-Disposition"] &&
- m.header["Content-Disposition"] =~ /filename="(.*?[^\\])"/
+ m.header["Content-Disposition"] =~ /filename="?(.*?[^\\])("|;|$)/
$1
elsif m.header["Content-Type"] &&
m.header["Content-Type"] =~ /name=(.*?)(;|$)/
@@ -309,7 +309,6 @@ private
## otherwise, it's body text
else
body = Message.decode_and_convert m
-
text_to_chunks body.normalize_whitespace.split("\n")
end
end