bugGNU Wget - Bugs: bug #40746, wget: fails to parse time from...

 
 

bug #40746: wget: fails to parse time from 'Last-Modified: Wed, 27 Nov 2013 07:06:38 UTC'

Submitted by:  Noël Köthe <nok>
Submitted on:  Fri 29 Nov 2013 08:59:00 AM UTC  
 
Category: Protocol IssueSeverity: 3 - Normal
Priority: 5 - NormalStatus: None
Privacy: PublicAssigned to: None
Originator Name: Open/Closed: Open
Release: trunkOperating System: GNU/Linux
Reproducibility: Every TimeFixed Release: None
Planned Release: NoneRegression: None
Work Required: NonePatch Included: Yes

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Mon 16 Dec 2013 11:55:06 AM UTC, comment #1:

Just to mention it. The server is broken and does not behave RFC 2616 compliant.

from RFC 2616, 3.3.1 Full Date

...
This is indicated in the first two formats by the inclusion of "GMT" as the three-letter abbreviation for time zone, and MUST be assumed when reading the asctime format.
...
HTTP-date = rfc1123-date | rfc850-date | asctime-date
rfc1123-date = wkday "," SP date1 SP time SP "GMT"
rfc850-date = weekday "," SP date2 SP time SP "GMT"
asctime-date = wkday SP date3 SP time SP 4DIGIT

Therefore Wget should just ignore the timezone in rfc1123-date and rfc850-date and always assume GMT/UTC.

Tim Ruehsen <rockdaboot>
Fri 29 Nov 2013 08:59:00 AM UTC, original submission:

Hello,

a forwarded Debian bug report from http://bugs.debian.org/730662

--8<--
wget does not parse Last-Modified timestamps in the UTC timezone,
resulting in error output
Last-modified header invalid -- time-stamp ignored.
and assigning all downloaded files the current timestamp - which is a loss of metadata.
The problem occurs in versions 1.13.4-3, 1.14-5, 1.14.96.38327-2.

These timestamps with a UTC instead of GMT timezone seem to be generated by a (transparent) proxy that identifies itself with this header:
Via: 1.1 xxxxx.xxxxx.xx:80 (Cisco-IronPort-WSA/7.7.0-608)

The patch is trivial, in src/http.c in check_end() the following clause needs to be added:

|| (p[0] == 'U' && p[1] == 'T' && p[2] == 'C')

(tested against the version in experimental)

Andreas
--8<--

Thanks for your work.

Regards

Noël

Noël Köthe <nok>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by rockdaboot (Posted a comment)
  • -unavailable- added by nok (Submitted the item)
  • -unavailable- added by nok
  •  

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 29 Nov 2013 08:59:00 AM UTCnokCarbon-Copy-=>Added -unavailable-

    Back to the top


    Powered by Savane 3.1-cleanup