List for cgit developers and users
 help / color / mirror / Atom feed
* Fwd: [PATCH] Add Etags for snapshots
       [not found] <CAKBpzhn6ZORwi5dDs2DcQ1qJgAsSe0o5-TqB-=c2_oYgSBT+mQ@mail.gmail.com>
@ 2015-01-27 21:14 ` ysangkok
  2015-01-28 12:43   ` Jason
  0 siblings, 1 reply; 2+ messages in thread
From: ysangkok @ 2015-01-27 21:14 UTC (permalink / raw)


Hi,

This adds etag support for snapshots. I tested it, it seems to work fine.

---
 ui-snapshot.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ui-snapshot.c b/ui-snapshot.c
index ea77eb4..cb34f4b 100644
--- a/ui-snapshot.c
+++ b/ui-snapshot.c
@@ -119,6 +119,7 @@ static int make_snapshot(const struct
cgit_snapshot_format *format,
                cgit_print_error("Not a commit reference: %s", hex);
                return 1;
        }
+       ctx.page.etag = sha1_to_hex(sha1);
        ctx.page.mimetype = xstrdup(format->mimetype);
        ctx.page.filename = xstrdup(filename);
        cgit_print_http_headers();
--
2.1.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH] Add Etags for snapshots
  2015-01-27 21:14 ` Fwd: [PATCH] Add Etags for snapshots ysangkok
@ 2015-01-28 12:43   ` Jason
  0 siblings, 0 replies; 2+ messages in thread
From: Jason @ 2015-01-28 12:43 UTC (permalink / raw)


Merged, thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.zx2c4.com/pipermail/cgit/attachments/20150128/4a10d4c0/attachment.html>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-01-28 12:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CAKBpzhn6ZORwi5dDs2DcQ1qJgAsSe0o5-TqB-=c2_oYgSBT+mQ@mail.gmail.com>
2015-01-27 21:14 ` Fwd: [PATCH] Add Etags for snapshots ysangkok
2015-01-28 12:43   ` Jason

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 NNTP newsgroup(s).