Skip to content

Commit

Permalink
be even more liberal
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Feb 11, 2015
1 parent 5547dff commit 5805894
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions Changes
Expand Up @@ -2,6 +2,7 @@
5.78 2015-02-11
- Replaced expires method in Mojo::Cookie::Response with an attribute.
- Added split_cookie_header function to Mojo::Util.
- Relaxed RFC 822/1123 and RFC 850/1036 handling in Mojo::Date.
- Improved design of built-in templates.
- Fixed bug in Mojo::DOM that made parsing a requirement.
- Fixed warnings in Mojo::URL.
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojo/Date.pm
Expand Up @@ -28,7 +28,7 @@ sub parse {
# RFC 850/1036 (Sunday, 06-Nov-94 08:49:37 GMT)
my $offset = 0;
my ($day, $month, $year, $h, $m, $s);
if ($date =~ /^\w+\W+(\d+)\W+(\w+)\D+(\d+)\W+(\d+):(\d+):(\d+)\W*\w+$/) {
if ($date =~ /^\w+\W+(\d+)\W+(\w+)\D+(\d+)\D+(\d+):(\d+):(\d+)\W*\w+$/) {
($day, $month, $year, $h, $m, $s) = ($1, $MONTHS{$2}, $3, $4, $5, $6);
}

Expand Down
2 changes: 1 addition & 1 deletion lib/Mojo/Util.pm
Expand Up @@ -49,7 +49,7 @@ my %XML = (
);

# "Sun, 06 Nov 1994 08:49:37 GMT" and "Sunday, 06-Nov-94 08:49:37 GMT"
my $EXPIRES_RE = qr/(\w+\W+\d+\W+\w+\D+\d+\W+\d+:\d+:\d+\W*\w+)/;
my $EXPIRES_RE = qr/(\w+\W+\d+\W+\w+\D+\d+\D+\d+:\d+:\d+\W*\w+)/;

# Encoding cache
my %CACHE;
Expand Down

0 comments on commit 5805894

Please sign in to comment.