Skip Menu |

This queue is for tickets about the DateTime-Format-Mail CPAN distribution.

Report information
The Basics
Id: 20451
Status: resolved
Priority: 0/
Queue: DateTime-Format-Mail

People
Owner: Nobody in particular
Requestors: JMEHNLE [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in:
  • 0.23
  • 0.24
  • 0.25
  • 0.26
  • 0.27
  • 0.28
  • 0.29
  • 0.2901
Fixed in: 0.30



Subject: day-of-week is _optional_ in RFC 2822 and 822
RFC 2822 says: date-time = [ day-of-week "," ] date FWS time [CFWS] RFC 822 says: date-time = [ day "," ] date time ; dd mm yy ; hh:mm:ss zzz So the day of the week is clearly optional. The strict parser regexp of DateTime::Format::Mail doesn't respect that, though. The included patch corrects that.
Subject: DateTime-Format-Mail-RFC2822-compliance-optional-day-of-week.patch
--- /usr/share/perl5/DateTime/Format/Mail.pm 2006-06-19 19:29:37.000000000 +0000 +++ Mail.pm 2006-07-13 23:41:46.000000000 +0000 @@ -42,9 +42,10 @@ my $strict_RE = qr{ ^ \s* # optional # [day-of-week "," ] - (?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) , + (?: + (?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) , \s* + )? # date => day month year - \s+ (\d{1,2}) # day => 1*2DIGIT \s+ (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) # month-name