-rw-r--r-- | html.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -46,16 +46,23 @@ void htmlf(const char *format, ...) va_list args; va_start(args, format); vsnprintf(buf, sizeof(buf), format, args); va_end(args); html(buf); } +void html_status(int code, int more_headers) +{ + htmlf("Status: %d\n", code); + if (!more_headers) + html("\n"); +} + void html_txt(char *txt) { char *t = txt; while(t && *t){ int c = *t; if (c=='<' || c=='>' || c=='&') { write(htmlfd, txt, t - txt); if (c=='>') |