Add support for ETag in 'plain' view
When downloading a blob identified by its path, the client might want to know if the blob has been modified since a previous download of the same path. To this end, an ETag containing the blob SHA1 seems to be ideal. Todo: add support for HEAD requests... Suggested-by: Owen Taylor <otaylor@redhat.com> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Αυτή η υποβολή περιλαμβάνεται σε:
1
cgit.c
1
cgit.c
@ -206,6 +206,7 @@ static void prepare_context(struct cgit_context *ctx)
|
||||
ctx->page.size = 0;
|
||||
ctx->page.modified = time(NULL);
|
||||
ctx->page.expires = ctx->page.modified;
|
||||
ctx->page.etag = NULL;
|
||||
}
|
||||
|
||||
struct refmatch {
|
||||
|
Αναφορά σε νέο ζήτημα
Block a user