* 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; 4+ 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] 4+ 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; 4+ 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] 4+ messages in thread
* [PATCH] Add Etags for snapshots
2015-01-17 13:54 cgit
@ 2015-01-19 11:18 ` Jason
0 siblings, 0 replies; 4+ messages in thread
From: Jason @ 2015-01-19 11:18 UTC (permalink / raw)
Janus -- I added you to the list manually, if you want to try resending
this yourself.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.zx2c4.com/pipermail/cgit/attachments/20150119/ae0e0f37/attachment.html>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] Add Etags for snapshots
@ 2015-01-17 13:54 cgit
2015-01-19 11:18 ` Jason
0 siblings, 1 reply; 4+ messages in thread
From: cgit @ 2015-01-17 13:54 UTC (permalink / raw)
From: Janus <ysangkok at gmail.com>
---
Sending this on behalf of Janus who cannot post to the list for some
reason.
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.2.2
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-01-28 12:43 UTC | newest]
Thread overview: 4+ 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
2015-01-17 13:54 cgit
2015-01-19 11:18 ` 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).