libwww-perl / libwww-perl/HTTP-Date
Weird problem with Apache-Coyote Last-modifed [rt.cpan.org #65125]
Open
Nobody has claimed this yet.
- Dominant language
- Perl
- Stars
- 3
- Forks
- 7
- PR merge metrics
- No merged PRs in 30d
Description
Migrated from rt.cpan.org#65125 (status was 'new')
Requestors:
- wjgeorge7@yahoo.com
From wjgeorge7@yahoo.com on 2011-01-25 21:27:41:
For some unknown reason I've spotted a non-conformat header from Apache.
Last-Modified: Tue, 25 January 2011 21:18:00 GMT
It's a simple and logical patch to the current code to work around it.
Basically, since the @MoY field is all three letter combos, a
modification to the default match string seems to fix this issue
--- /var/www/cgi-bin/mte/extlib/HTTP/Date.pm 2011-01-25
16:25:21.000000000 -0500
+++ xxx 2011-01-25 16:24:57.000000000 -0500
@@ -37,7 +37,7 @@
return undef unless defined $str;
# fast exit for strictly conforming string
- if ($str =~ /^[SMTWF][a-z][a-z], (\d\d) ([JFMAJSOND][a-z][a-z])
(\d\d\d\d) (\d\d):(\d\d):(\d\d) GMT$/) {
+ if ($str =~ /^[SMTWF][a-z][a-z], (\d\d)
([JFMAJSOND][a-z][a-z])[a-z]* (\d\d\d\d) (\d\d):(\d\d):(\d\d) GMT$/) {
return eval {
my $t = Time::Local::timegm($6, $5, $4, $1, $MoY{$2}-1, $3-1900);
$t < 0 ? undef : $t;
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate HTTP/Date.pm and start at the strict date-matching regex shown in the issue. Verify that the Apache-Coyote Last-Modified header is accepted while conforming HTTP dates continue to parse correctly; completion should include coverage for the reported header if the repository has parser tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- perl
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100