From mboxrd@z Thu Jan 1 00:00:00 1970 From: john at keeping.me.uk (John Keeping) Date: Tue, 7 Apr 2015 14:32:13 +0100 Subject: [PATCH 01/17] ui-shared: add cgit_print_error_page() function In-Reply-To: References: <142f58e03d1444c0d797a8bbf60593f671ac34ab.1428248621.git.john@keeping.me.uk> Message-ID: <20150407133212.GJ21452@serenity.lan> On Tue, Apr 07, 2015 at 03:23:03PM +0200, Jason A. Donenfeld wrote: > On Sun, Apr 5, 2015 at 5:54 PM, John Keeping wrote: > > > > +void cgit_print_error_page(int code, const char *msg, const char *fmt, > > ...) > > +{ > > + va_list ap; > > + ctx.page.status = 404; > > + ctx.page.statusmsg = "Not found"; > > > > Shouldn't status = code here, not hardcoded 404? Yes, copy+paste error I think :-( There also needs to be a change to the "expires" field here (otherwise we send an error page with an expiry date 10 years in the future!), but I didn't want to spam the list with messages by sending a re-roll before any feedback.