[go: up one dir, main page]

Skip to content

Add If-Modified-Since:/Last-modified support to downloaded archives

Problem to solve

If a user runs wget multiple times:

$ wget -N https://gitlab.com/gitlab-org/gitter/env/-/archive/master/env-master.tar.bz2
$ wget -N https://gitlab.com/gitlab-org/gitter/env/-/archive/master/env-master.tar.bz2
(...)
Last-modified header missing -- time-stamps turned off.
(...)

It downloads every time because gitlab did not informed the HTTP header field Last-modified.

Further details

Adding Last-modified, it will save gitlab and user bandwidth.

Proposal

Add If-Modified-Since:/Last-modified support using the timestamp of the last commit

What does success look like, and how can we measure that?

$ wget -N https://gitlab.com/gitlab-org/gitter/env/-/archive/master/env-master.tar.bz2
$ wget -N https://gitlab.com/gitlab-org/gitter/env/-/archive/master/env-master.tar.bz2
(...)
... 304 Not Modified
(...)

Links / references