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 c75202a..d432cb1 100644
--- a/contexts.c
+++ b/contexts.c
@@ -29,7 +29,7 @@ const char *ContextsQuery = SQL(
 );
 
 enum kcgi_err pageContexts(struct kreq *req) {
-	if (!req->fieldmap[Network]) return httpFail(req, KHTTP_404);
+	if (!req->fieldmap[Network]) return httpFail(req, KHTTP_400);
 	enum kcgi_err error = httpHead(req, KHTTP_200, KMIME_TEXT_HTML);
 	if (req->method == KMETHOD_HEAD) return error;
 
@@ -59,7 +59,8 @@ enum kcgi_err pageContexts(struct kreq *req) {
 		);
 		if (!href) err(EX_OSERR, "khttp_urlpart");
 
-		error = khtml_elem(&html, KELEM_LI)
+		error = 0
+			|| khtml_elem(&html, KELEM_LI)
 			|| khtml_attr(&html, KELEM_A, KATTR_HREF, href, KATTR__MAX)
 			|| khtml_puts(&html, context)
 			|| khtml_closeelem(&html, 2);