[PATCH 01/17] ui-shared: add cgit_print_error_page() function

John Keeping john at keeping.me.uk
Tue Apr 7 15:32:13 CEST 2015


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.


More information about the CGit mailing list