Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Email-MIME CPAN distribution.

Report information
The Basics
Id: 6813
Status: resolved
Priority: 0/
Queue: Email-MIME

People
Owner: Nobody in particular
Requestors: scott [...] perlcode.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.3
Fixed in: (no value)



Subject: patch for RFC 2183 Content-Disposition handling
Hi Simon, I have a patch for Email::MIME 1.3 that silences a warning in Email::MIME::ContentType::_parse_attributes() against an inline Content-Disposition field of this form: Content-type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary=ZmUaFz6apKcXQszQ Content-disposition: inline or even this: Content-Type: text/plain; charset=us-ascii Content-Disposition: inline To duplicate, simply my $parsed = Email::MIME->new($message); where $message contains one of the above content-disposition headers (e.g., the mutt mail agent creates these kinds of headers for the main text body after attaching a file). That $dis is parsed (in attached patch) via _parse_attributes for ContentType is probably not correct, since Content-Type and Content-Disposition headers have different syntaxes. The other case similar to 'inline' is 'attachment', which (like 'inline') doesn't require any parameters but they are nearly always supplied (RFC 2183 part 2). Either way it doesn't seem to affect the parsing of the object (I did a Dumper on a Email::MIME object both ways and they came out equivalent). Btw, your Email::MIME package has saved me at least a week on my current project; thanks a TON. Scott
--- MIME.pm~ Mon Apr 5 16:24:55 2004 +++ MIME.pm Thu Jul 1 02:50:16 2004 @@ -108,7 +108,7 @@ return $gcache{$self} if exists $gcache{$self}; my $dis = $self->header("Content-Disposition"); - $dis =~ s/^.*?;//; + $dis =~ s/^(?:.*?;|inline|attachment)//i; my $attrs = Email::MIME::ContentType::_parse_attributes($dis); my $name = $attrs->{filename} || $self->{ct}{attributes}{name};
This was fixed in 1.4, and should be closed.
Subject: Re: [rt.cpan.org #6813] patch for RFC 2183 Content-Disposition handling
Date: Thu, 6 Jul 2006 23:35:50 -0600
To: Ricardo Signes via RT <bug-Email-MIME [...] rt.cpan.org>
From: Scott Wiersdorf <scott [...] perlcode.org>
On Fri, Jul 07, 2006 at 12:20:27AM -0400, Ricardo Signes via RT wrote: Show quoted text
> > <URL: http://rt.cpan.org/Ticket/Display.html?id=6813 > > > This was fixed in 1.4, and should be closed.
Will the maintainer do this, or are you suggesting I should close it? Scott -- Scott Wiersdorf <scott@perlcode.org>
From: rjbs [...] cpan.org
On Fri Jul 07 01:36:21 2006, scott@perlcode.org wrote: Show quoted text
> Will the maintainer do this, or are you suggesting I should close it? > > Scott
The maintainer should do this. I am trying to get this and other Email:: modules properly maintained. Don't sweat it. -- rjbs