Git Mailing List Archive mirror
 help / color / mirror / Atom feed
* GitWeb caching of snapshots
@ 2015-01-16  0:13 Janus Troelsen
  0 siblings, 0 replies; only message in thread
From: Janus Troelsen @ 2015-01-16  0:13 UTC (permalink / raw
  To: git

Hi,

I noticed that GitWeb caches based on the "Last-Modified" header.
Won't this break if somebody force pushes a branch with the new newest
commit being older than the previous? The modification date will be
older, which makes little sense to HTTP clients, and it would probably
break since they use the "If-Modified-Since" header.

Wouldn't it make more sense to use the commit ID as an ETag? This
would avoid this bug. Two different archive types would get the same
ETag even if the HTTP content body is not equal, but I think this is
not in violation of the HTTP standard, since caching is based on URL's
AND ETags.

Here's a link to git_snapshot which is the relevant function:
http://git.kernel.org/cgit/git/git.git/tree/gitweb/gitweb.perl#n7314

Looking forward to your feedback.

Regards,
Janus

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-01-16  0:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-16  0:13 GitWeb caching of snapshots Janus Troelsen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).