summary refs log tree commit diff
path: root/server.c
diff options
context:
space:
mode:
Diffstat (limited to 'server.c')
-rw-r--r--server.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/server.c b/server.c
index bc05299..c384020 100644
--- a/server.c
+++ b/server.c
@@ -21,6 +21,7 @@
 #include <sysexits.h>
 #include <unistd.h>
 
+#include "css.h"
 #include "server.h"
 
 sqlite3 *db;
@@ -51,15 +52,13 @@ const struct kvalid Keys[KeysLen] = {
 #undef X
 };
 
-static const char CSS[] = {
-#include "default.css.h"
-};
-static const char *Cache = "public, max-age=86400, immutable";
-
 static enum kcgi_err stylesheet(struct kreq *req) {
 	if (req->mime != KMIME_TEXT_CSS) return httpFail(req, KHTTP_404);
 	return httpHead(req, KHTTP_200, KMIME_TEXT_CSS)
-		|| khttp_head(req, kresps[KRESP_CACHE_CONTROL], "%s", Cache)
+		|| khttp_head(
+			req, kresps[KRESP_CACHE_CONTROL],
+			"public, max-age=86400, immutable"
+		)
 		|| khttp_body(req)
 		|| khttp_write(req, CSS, sizeof(CSS));
 }