]> granicus.if.org Git - libevent/commitdiff
Make http-server.c output into good html5
authorNick Mathewson <nickm@torproject.org>
Fri, 30 May 2014 17:53:27 +0000 (13:53 -0400)
committerNick Mathewson <nickm@torproject.org>
Fri, 30 May 2014 17:53:27 +0000 (13:53 -0400)
sample/http-server.c

index 1cb89bc91b04ed7a3ec4a84d1889ce712411cf7e..e18c8562020bcabe01746a3b04acf1bc880b7b6e 100644 (file)
@@ -246,7 +246,10 @@ send_document_cb(struct evhttp_request *req, void *arg)
                        goto err;
 #endif
 
-               evbuffer_add_printf(evb, "<html>\n <head>\n"
+               evbuffer_add_printf(evb,
+                    "<!DOCTYPE html>\n"
+                    "<html>\n <head>\n"
+                    "  <meta charset='utf-8'>\n"
                    "  <title>%s</title>\n"
                    "  <base href='%s%s'>\n"
                    " </head>\n"