char cookie[SIZ];
char httpnow[SIZ];
- wprintf("HTTP/1.0 200 OK\n");
+ wprintf("HTTP/1.1 200 OK\n");
httpdate(httpnow, time(NULL));
if (do_httpheaders) {
* Generic function to do an HTTP redirect. Easy and fun.
*/
void http_redirect(char *whichpage) {
- wprintf("HTTP/1.0 302 Moved Temporarily\n");
+ wprintf("HTTP/1.1 302 Moved Temporarily\n");
wprintf("Location: %s\r\n", whichpage);
wprintf("URI: %s\r\n", whichpage);
wprintf("Content-type: text/html; charset=utf-8\r\n\r\n");
sprintf(buf, "static/%s", what);
fp = fopen(buf, "rb");
if (fp == NULL) {
- wprintf("HTTP/1.0 404 %s\n", strerror(errno));
+ wprintf("HTTP/1.1 404 %s\n", strerror(errno));
wprintf("Content-Type: text/plain\r\n");
wprintf("\r\n");
wprintf("Cannot open %s: %s\n", what, strerror(errno));
http_transmit_thing(content, bytes, content_type, 0);
free(content);
} else {
- wprintf("HTTP/1.0 404 %s\n", &buf[4]);
+ wprintf("HTTP/1.1 404 %s\n", &buf[4]);
output_headers(0, 0, 0, 0, 0, 0);
wprintf("Content-Type: text/plain\r\n");
wprintf("\r\n");
*/
void convenience_page(char *titlebarcolor, char *titlebarmsg, char *messagetext)
{
- wprintf("HTTP/1.0 200 OK\n");
+ wprintf("HTTP/1.1 200 OK\n");
output_headers(1, 1, 2, 0, 0, 0);
wprintf("<div id=\"banner\">\n");
wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#%s\"><TR><TD>", titlebarcolor);
/* This is probably temporary and should be revisited */
void authorization_required(const char *message)
{
- wprintf("HTTP/1.0 401 Authorization Required\r\n");
+ wprintf("HTTP/1.1 401 Authorization Required\r\n");
wprintf("WWW-Authenticate: Basic realm=\"\"\r\n", serv_info.serv_humannode);
wprintf("Content-Type: text/html\r\n\r\n");
wprintf("<h1>");