summary refs log tree commit diff
path: root/contexts.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--contexts.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/contexts.c b/contexts.c
index 69afcdc..5eba403 100644
--- a/contexts.c
+++ b/contexts.c
@@ -61,12 +61,13 @@ enum kcgi_err contextsPage(struct kreq *req) {
 	struct Scope scope = pageScope(req);
 	if (!scope.network) return httpFail(req, KHTTP_400);
 
-	enum kcgi_err error = httpHead(req, KHTTP_200, KMIME_TEXT_HTML);
+	enum kcgi_err error = 0
+		|| httpHead(req, KHTTP_200, KMIME_TEXT_HTML)
+		|| khttp_body(req);
 	if (req->method == KMETHOD_HEAD) return error;
 
 	struct khtmlreq html;
 	error = error
-		|| khttp_body(req)
 		|| khtml_open(&html, req, 0)
 		|| htmlHead(&html, scope.network)
 		|| htmlNav(&html, scope);