Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 430350 - Last-modified header invalid
Summary: Last-modified header invalid
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Infrastructure
Classification: Unclassified
Component: [OLD] gpackages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Packages Website
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-07 20:09 UTC by wbrana
Modified: 2012-12-30 09:05 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description wbrana 2012-08-07 20:09:07 UTC
wget gives error: Last-modified header invalid -- time-stamp ignored.
Last-modified also seems to be always more than 1 hour behind real time

wget -d -v http://packages.gentoo.org/feed/verbump
Setting --verbose (verbose) to 1
DEBUG output created by Wget 1.14 on linux-gnu.

--2012-08-07 21:52:08--  http://packages.gentoo.org/feed/verbump
Resolving packages.gentoo.org... 140.211.166.187
Caching packages.gentoo.org => 140.211.166.187
Connecting to packages.gentoo.org|140.211.166.187|:80... connected.
Created socket 3.
Releasing 0x00000050f641a800 (new refcount 1).

---request begin---
GET /feed/verbump HTTP/1.1
User-Agent: Wget/1.14 (linux-gnu)
Accept: */*
Host: packages.gentoo.org
Connection: Keep-Alive

---request end---
HTTP request sent, awaiting response... 
---response begin---
HTTP/1.1 200 OK
Server: Apache
Expires: Tue, 07 Aug 2012 19:47:00 UTC
Last-Modified: Tue, 07 Aug 2012 18:31:30 UTC
Cache-Control: max-age=1800, public, s-maxage=1800
Vary: Accept-Encoding
Content-Type: text/html;charset=utf-8
Content-Length: 13549
Date: Tue, 07 Aug 2012 19:52:10 GMT
X-Varnish: 1040720423 1040715347
Age: 1722
Via: 1.1 varnish
Connection: keep-alive

---response end---
200 OK
Registered socket 3 for persistent reuse.
Length: 13549 (13K) [text/html]
Saving to: 'verbump'

Last-modified header invalid -- time-stamp ignored.

after later call:

HTTP/1.1 200 OK
Server: Apache
Expires: Tue, 07 Aug 2012 20:17:00 UTC
Last-Modified: Tue, 07 Aug 2012 19:01:11 UTC
Cache-Control: max-age=1800, public, s-maxage=1800
Vary: Accept-Encoding
Content-Type: text/html;charset=utf-8
Content-Length: 14790
Date: Tue, 07 Aug 2012 20:03:47 GMT
X-Varnish: 1040721942 1040720556
Age: 619
Via: 1.1 varnish
Connection: keep-alive
Comment 1 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2012-08-07 20:35:53 UTC
Why is the header invalid? It looks perfectly valid to me.

Also, the >1 hour lag is correct. The tree is already ~40 mins old when you fetch it via rsync, and updating the data often takes 20+ minutes.
Comment 2 wbrana 2012-08-07 20:56:28 UTC
probably because wget function http_atotm returned -1

 tmr = http_atotm (hstat.remote_time);
              if (tmr == (time_t) (-1))
                logputs (LOG_VERBOSE, _("\
Last-modified header invalid -- time-stamp ignored.\n"));
Comment 3 wbrana 2012-08-07 22:17:19 UTC
header is probably invalid because it has UTC instead of GMT
Comment 4 Alec Warner (RETIRED) archtester gentoo-dev Security 2012-12-30 09:05:29 UTC
(In reply to comment #3)
> header is probably invalid because it has UTC instead of GMT

All HTTP date/time stamps MUST be represented in Greenwich Mean Time (GMT), without exception. For the purposes of HTTP, GMT is exactly equal to UTC (Coordinated Universal Time).

Fixed:
antarus@a01 ~/code/checkouts/packages/web $ git cherry-pick be65ddb
[master 2779d06] Change to GMT to meet RFC requirements and fix bug 430350
 1 files changed, 2 insertions(+), 2 deletions(-)
To git@git.gentoo.org:/packages
   03dd7f5..2779d06  master -> master