1 9df487d7 2003-11-23 devnull #include <u.h>
2 9df487d7 2003-11-23 devnull #include <libc.h>
3 9df487d7 2003-11-23 devnull #include <bin.h>
4 9df487d7 2003-11-23 devnull #include <httpd.h>
7 9df487d7 2003-11-23 devnull * write initial part of successful header
10 9df487d7 2003-11-23 devnull hokheaders(HConnect *c)
12 9df487d7 2003-11-23 devnull Hio *hout;
14 9df487d7 2003-11-23 devnull hout = &c->hout;
15 9df487d7 2003-11-23 devnull hprint(hout, "%s 200 OK\r\n", hversion);
16 9df487d7 2003-11-23 devnull hprint(hout, "Server: Plan9\r\n");
17 9df487d7 2003-11-23 devnull hprint(hout, "Date: %D\r\n", time(nil));
18 9df487d7 2003-11-23 devnull if(c->head.closeit)
19 9df487d7 2003-11-23 devnull hprint(hout, "Connection: close\r\n");
20 9df487d7 2003-11-23 devnull else if(!http11(c))
21 9df487d7 2003-11-23 devnull hprint(hout, "Connection: Keep-Alive\r\n");