aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrumeet <yuuta@yuuta.moe>2021-11-18 17:15:52 -0800
committerTrumeet <yuuta@yuuta.moe>2021-11-18 17:15:52 -0800
commit809d222a302874b9b9cf6620f0b960090ddbbe9e (patch)
treeea001bc7083c312fe376948fb884144eb93e77a4
parent668388e6604f65009809f31f97e08315c380dc41 (diff)
downloadmdrd-809d222a302874b9b9cf6620f0b960090ddbbe9e.tar
mdrd-809d222a302874b9b9cf6620f0b960090ddbbe9e.tar.gz
mdrd-809d222a302874b9b9cf6620f0b960090ddbbe9e.tar.bz2
mdrd-809d222a302874b9b9cf6620f0b960090ddbbe9e.zip
feat: add a basic <head> section
-rw-r--r--main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/main.c b/main.c
index 335e889..1e77027 100644
--- a/main.c
+++ b/main.c
@@ -84,8 +84,10 @@ int main() {
cmark_node_free(document);
printf("Content-Type: text/html\r\n"
"Content-Length: %d\r\n"
- "\r\n%s",
- strlen(html) * sizeof(char),
+ "\r\n"
+ "<html><head><meta charset=\"utf-8\"></head><body>%s</body></html>",
+ (strlen("<html><head><meta charset=\"utf-8\"></head><body></body></html>") + strlen(html))
+ * sizeof(char),
html);
free(html);
fclose(file);