GitWeb caching of snapshots

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]