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'

Submitter:  Noël Köthe <nok>
Submitted:  Fri 29 Nov 2013 08:59:00 AM UTC
   
 
Category:  Protocol Issue Severity:  3 - Normal
Priority:  5 - Normal Status:  Wont Fix
Privacy:  Public Assigned to:  None
Originator Name:  Open/Closed:  Closed
Release:  trunk Operating System:  GNU/Linux
Reproducibility:  Every Time Fixed Release:  None
Planned Release:  None Regression:  None
Work Required:  None Patch Included:  Yes
* Mandatory Fields

Add a New Comment Rich Markup
   

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>
Group administrator
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 Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-03-12 darnir StatusNone Wont Fix
        Open/ClosedOpen Closed
    2013-11-29 nok Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code