Skip Menu |

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

Report information
The Basics
Id: 13456
Status: resolved
Priority: 0/
Queue: Email-Simple-Headers

People
Owner: Nobody in particular
Requestors: tallison [...] tacocat.net
Cc:
AdminCc:

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



Subject: NULL Body message may fail
I was working with this module a while back to try and parse out the headers only portion of an IMAP retrieved message (no body, only four headers:From, To, Date, Subject). It failed to understand the text as a valid email. I do not believe that '\n\n' is a requirement for an email even though you would end up with a null message.
To: bug-Email-Simple-Headers [...] rt.cpan.org
Subject: Re: [cpan #13456] AutoReply: NULL Body message may fail
From: "Tom Allison" <tallison [...] tacocat.net>
Date: Tue, 28 Jun 2005 17:07:06 -0400 (EDT)
RT-Send-Cc:
This bug probably needs to be removed....
From: rjbs [...] cpan.org
I cannot verify this bug, but I have attached a patch that tests for this problem, for future regression testing.
diff -Nur Email-Simple-Headers-1.01/Changes Email-Simple-Headers-1.02/Changes --- Email-Simple-Headers-1.01/Changes 2004-07-30 13:57:09.000000000 -0400 +++ Email-Simple-Headers-1.02/Changes 2006-07-03 18:19:16.000000000 -0400 @@ -1,3 +1,8 @@ +1.02 2006-07-03 + + - added a test to check that everything works with bodyless messages + (bug 13456); no problem found + 1.01 2004-07-30 - Initial Version diff -Nur Email-Simple-Headers-1.01/MANIFEST Email-Simple-Headers-1.02/MANIFEST --- Email-Simple-Headers-1.01/MANIFEST 2004-07-30 13:57:38.000000000 -0400 +++ Email-Simple-Headers-1.02/MANIFEST 2006-07-03 18:20:35.000000000 -0400 @@ -4,4 +4,5 @@ MANIFEST This list of files META.yml README +t/no-body.t t/test.t diff -Nur Email-Simple-Headers-1.01/lib/Email/Simple/Headers.pm Email-Simple-Headers-1.02/lib/Email/Simple/Headers.pm --- Email-Simple-Headers-1.01/lib/Email/Simple/Headers.pm 2004-07-30 14:03:52.000000000 -0400 +++ Email-Simple-Headers-1.02/lib/Email/Simple/Headers.pm 2006-07-03 18:19:30.000000000 -0400 @@ -2,7 +2,7 @@ use strict; use vars qw[$VERSION]; -$VERSION = sprintf "%d.%02d", split m/\./, (qw$Revision: 1.1 $)[1]; +$VERSION = '1.02'; package Email::Simple; use strict; diff -Nur Email-Simple-Headers-1.01/t/no-body.t Email-Simple-Headers-1.02/t/no-body.t --- Email-Simple-Headers-1.01/t/no-body.t 1969-12-31 19:00:00.000000000 -0500 +++ Email-Simple-Headers-1.02/t/no-body.t 2006-07-03 18:17:43.000000000 -0400 @@ -0,0 +1,16 @@ +use Test::More qw[no_plan]; +use strict; +$^W = 1; + +use_ok 'Email::Simple'; +use_ok 'Email::Simple::Headers'; + +my $email = Email::Simple->new(<<'__MESSAGE__'); +From: casey@geeknest.com +To: drain@example.com +Subject: Message in a bottle +__MESSAGE__ + +can_ok $email, 'headers'; + +ok eq_set( [qw[From To Subject]], [$email->headers] ), 'have expected headers';
Closed pending recurrance. -- rjbs