blob: cba39a91c0173ad5614c0f00b277ae3497af1dd8 [file] [log] [blame]
rsc9df487d2003-11-23 18:19:35 +00001#include <u.h>
2#include <libc.h>
3#include <bin.h>
4#include <httpd.h>
5
6/*
7 * write initial part of successful header
8 */
9void
10hokheaders(HConnect *c)
11{
12 Hio *hout;
13
14 hout = &c->hout;
15 hprint(hout, "%s 200 OK\r\n", hversion);
16 hprint(hout, "Server: Plan9\r\n");
17 hprint(hout, "Date: %D\r\n", time(nil));
18 if(c->head.closeit)
19 hprint(hout, "Connection: close\r\n");
20 else if(!http11(c))
21 hprint(hout, "Connection: Keep-Alive\r\n");
22}