[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cgit
Subject:    Re: [PATCH 01/17] ui-shared: add cgit_print_error_page() function
From:       John Keeping <john () keeping ! me ! uk>
Date:       2015-04-07 18:17:54
Message-ID: 20150407181754.GK21452 () serenity ! lan
[Download RAW message or body]

On Tue, Apr 07, 2015 at 03:36:32PM +0200, Jason A. Donenfeld wrote:
> I've put them in this branch with a few fixes:
> http://git.zx2c4.com/cgit/log/?h=jk/http-status-codes
> 
> Feel free to send diffs I should squash into any of these commits.

Thanks.  The only other change I have from testing this yesterday is
this; I'm not sure if 5 minutes is a sensible value here but I'm not
sure it's worth exposing this as a config variable and any downstream
cache can be configured with specific timeouts for different response
codes if required:

-- >8 --
Subject: [PATCH] fixup! ui-shared: add cgit_print_error_page() function

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

diff --git a/ui-shared.c b/ui-shared.c
index c11d9b6..5126962 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -770,6 +770,7 @@ void cgit_print_docend(void)
 void cgit_print_error_page(int code, const char *msg, const char *fmt, ...)
 {
 	va_list ap;
+	ctx.page.expires = 5 * 60; /* 5 minutes */
 	ctx.page.status = code;
 	ctx.page.statusmsg = msg;
 	cgit_print_http_headers();
-- 8< --
_______________________________________________
CGit mailing list
CGit@lists.zx2c4.com
http://lists.zx2c4.com/mailman/listinfo/cgit
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic