Re: [PATCH] Handle If-None-Match HTTP header in plain view

2014-08-13 Thread John Keeping
On Tue, Aug 12, 2014 at 06:53:01PM -0300, Damián Nohales wrote: 2014-08-12 16:15 GMT-03:00 John Keeping j...@keeping.me.uk: If we have sufficient infrastructure to handle HEAD requests then it should be trivial to add proper Etag handling on top, but I don't think it's trivial to add that.

Re: [PATCH] Handle If-None-Match HTTP header in plain view

2014-08-12 Thread Damián Nohales
Ah... I got it. We could implement cache disabling per command to disable it for the plain command. I don't know if there is another way since Etag is calculated at command execution. 2014-08-12 6:00 GMT-03:00 John Keeping j...@keeping.me.uk: On Mon, Aug 11, 2014 at 07:45:53PM -0300, Damián

Re: [PATCH] Handle If-None-Match HTTP header in plain view

2014-08-12 Thread Damián Nohales
2014-08-12 16:15 GMT-03:00 John Keeping j...@keeping.me.uk: On Tue, Aug 12, 2014 at 12:38:35PM -0300, Damián Nohales wrote: Ah... I got it. We could implement cache disabling per command to disable it for the plain command. I don't know if there is another way since Etag is calculated at

[PATCH] Handle If-None-Match HTTP header in plain view

2014-08-11 Thread Damián Nohales
We are sending Etag to clients but this header is basically unusefulness if the server doesn't tell the client if the content has been changed or not for a given Path/Etag pair. Signed-off-by: Damián Nohales damiannoha...@gmail.com --- cgit.c | 1 + cgit.h | 1 + ui-plain.c | 41

Re: [PATCH] Handle If-None-Match HTTP header in plain view

2014-08-11 Thread John Keeping
On Mon, Aug 11, 2014 at 05:53:23PM -0300, Damián Nohales wrote: We are sending Etag to clients but this header is basically unusefulness if the server doesn't tell the client if the content has been changed or not for a given Path/Etag pair. Signed-off-by: Damián Nohales

Re: [PATCH] Handle If-None-Match HTTP header in plain view

2014-08-11 Thread Damián Nohales
(Sorry, I forgot to include the list address in my response.) This does not interact with CGit's cache at all, this interacts with client side cache. If the client sends an Etag it means Hey, I have the content cached for this URL in the client and its Etag is abc123, so, for a given URL, if