commit 0bc4913245635453fea1a43b7d43126d789eacb0
parent 881bac62392d86edf46bcb0d269a7195e41ff8c1
Author: wmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Date: Mon, 26 Nov 2007 20:12:56 +0000
mime type filename detection patch form Nicolas Pouillard
git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@723 5c8cc53c-5e98-4d25-b20a-d8db53a31250
Diffstat:
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/lib/sup/message.rb b/lib/sup/message.rb
@@ -352,11 +352,9 @@ private
else
filename =
## first, paw through the headers looking for a filename
- if m.header["Content-Disposition"] &&
- m.header["Content-Disposition"] =~ /filename="?(.*?[^\\])("|;|$)/
+ if m.header["Content-Disposition"] && m.header["Content-Disposition"] =~ /filename="?(.*?[^\\])("|;|$)/
$1
- elsif m.header["Content-Type"] &&
- m.header["Content-Type"] =~ /name=(.*?)(;|$)/
+ elsif m.header["Content-Type"] && m.header["Content-Type"] =~ /name="?(.*?[^\\])("|;|$)/
$1
## haven't found one, but it's a non-text message. fake