Subject: | if_modified_since calls time2str and dies |
The documentation at http://search.cpan.org/~ether/HTTP-Message-6.08/lib/HTTP/Headers.pm does not specify the format of the argument to HTTP::Headers::if_modified_since. Reading the spec at http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html I assumed H::H::if_modified_since takes a date field. But H::H::if_modified_since has this code which dies in time2str because it's already a string:
if (defined $time) {
$self->_header($header, HTTP::Date::time2str($time));
}
Here's my stack trace of the fault:
2015/07/17 14:43:27 TRACE> 0: bb-links.fcgi:103 main::__ANON__ - /home/hornenj/perlmods/share/perl/5.14.2/HTTP/Headers.pm:304 in function HTTP::Date::time2str
2015/07/17 14:43:27 TRACE> 0: bb-links.fcgi:103 main::__ANON__ - /home/hornenj/perlmods/share/perl/5.14.2/HTTP/Headers.pm:314 in function HTTP::Headers::_date_header
2015/07/17 14:43:27 TRACE> 0: bb-links.fcgi:103 main::__ANON__ - /home/hornenj/perlmods/share/perl/5.14.2/HTTP/Message.pm:644 in function HTTP::Headers::if_modified_since
2015/07/17 14:43:27 TRACE> 0: bb-links.fcgi:103 main::__ANON__ - bb-links.fcgi:2325 in function HTTP::Message::__ANON__