Last modified: 2011-02-08 21:56:22 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T23575, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 21575 - HTTP server at download.wikipedia.org should set Last-Modified header
HTTP server at download.wikipedia.org should set Last-Modified header
Status: RESOLVED FIXED
Product: Wikimedia
Classification: Unclassified
Site requests (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
http://download.wikipedia.org
: shell
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-11-19 22:40 UTC by Christopher Sahnwaldt
Modified: 2011-02-08 21:56 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Christopher Sahnwaldt 2009-11-19 22:40:25 UTC
lighttpd at http://download.wikipedia.org currently does not set the Last-Modified header in the response for most files.

Example: the response to a GET or HEAD request for http://download.wikipedia.org/enwiki/latest/enwiki-latest-interwiki.sql.gz does not include a Last-Modified header, but the response for http://download.wikipedia.org/enwiki/latest/enwiki-latest-interwiki.sql.gz-rss.xml does.

The reason is probably this: "If there is no content-type set, we remove the Last-Modified header" http://redmine.lighttpd.net/issues/1236

To fix this, it should suffice to add the following lines to the lighttpd config file:

mimetype.assign = (
".gz" => "application/x-gzip",
".bz2" => "application/x-bzip"
)

The Last-Modified header would be helpful for many things, e.g. to set the correct timestamp for the local copy of the file and to use wget timestamping.
Comment 1 Diederik van Liere 2011-01-28 15:52:54 UTC
A strong upvote for this bug, it will make it possible to automatically detect a new version of a dump file and it's a small thing to do.
Comment 2 Krinkle 2011-01-29 19:13:18 UTC
Sounds like something that should be done. Per comment 1 above.
Comment 3 JeLuF 2011-01-30 09:31:59 UTC
I've added this to the config file:

mimetype.assign += (
".gz" => "application/x-gzip",
".bz2" => "application/x-bzip"
)

Result:

# HEAD http://download.wikipedia.org/enwiki/latest/enwiki-latest-interwiki.sql.gz
200 OK
Connection: close
Date: Sun, 30 Jan 2011 09:29:49 GMT
Accept-Ranges: bytes
ETag: "4224011594"
Server: lighttpd/1.4.26
Content-Length: 7905
Content-Type: application/x-gzip
Last-Modified: Sat, 15 Jan 2011 08:02:05 GMT         <-------------
Client-Date: Sun, 30 Jan 2011 09:29:49 GMT
Client-Peer: 208.80.152.185:80
Client-Response-Num: 1

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links