summary refs log tree commit diff
path: root/search.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--search.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/search.c b/search.c
index 878e0f7..af29685 100644
--- a/search.c
+++ b/search.c
@@ -52,12 +52,13 @@ enum kcgi_err searchPage(struct kreq *req) {
 	int64_t offset = 0;
 	if (req->fieldmap[Offset]) offset = req->fieldmap[Offset]->parsed.i;
 
-	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.query)
 		|| htmlNav(&html, scope)