742efb6ff310c75a30cf13088111139cf713b9db angie Tue Feb 23 11:06:52 2016 -0800 Unifying some triplicate code to print an HTTP error 400 response (Bad Request) and exit. diff --git src/inc/htmshell.h src/inc/htmshell.h index dbceaf5..277a7b0 100644 --- src/inc/htmshell.h +++ src/inc/htmshell.h @@ -120,30 +120,34 @@ /* Set background color - needs to be called before htmlStart * or htmShell. */ void htmlBadVar(char *varName); /* Complain about input variables. */ void htmlImage(char *fileName, int width, int height); /* Display centered image file. */ jmp_buf htmlRecover; /* Error recovery jump. Exposed for cart's use. */ void htmlVaWarn(char *format, va_list args); /* Write an error message. (Generally you just call warn() or errAbort(). * This is exposed mostly for the benefit of the cart.) */ +void htmlVaBadRequestAbort(char *format, va_list args); +/* Print out an HTTP header 400 status code (Bad Request) and message, + * then exit with error. For use as an errAbort handler. */ + char *htmlWarnStartPattern(); /* Return starting pattern for warning message. */ char *htmlWarnEndPattern(); /* Return ending pattern for warning message. */ void htmlWarnBoxSetup(FILE *f); /* Creates an invisible, empty warning box than can be filled with errors * and then made visible. */ void htmlAbort(); /* Terminate HTML file. Exposed for cart's use. */ void htmlPushEarlyHandlers(); /* Push stuff to close out web page to make sensible error