summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--server.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/server.c b/server.c
index 0ed1c9c..96acad7 100644
--- a/server.c
+++ b/server.c
@@ -54,13 +54,15 @@ const struct kvalid Keys[KeysLen] = {
 
 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)
+	enum kcgi_err error = 0
+		|| httpHead(req, KHTTP_200, KMIME_TEXT_CSS)
 		|| khttp_head(
 			req, kresps[KRESP_CACHE_CONTROL],
 			"public, max-age=86400, immutable"
 		)
-		|| khttp_body(req)
-		|| khttp_write(req, CSS, sizeof(CSS));
+		|| khttp_body(req);
+	if (req->method == KMETHOD_HEAD) return error;
+	return error || khttp_write(req, CSS, sizeof(CSS));
 }
 
 static enum kcgi_err dispatch(struct kreq *req) {
span>Use a real IMAP parserJune McEnroe 2020-04-07Simplify mboxrd output 1.0p2June McEnroe 2020-04-06Don't bother generating real From linesJune McEnroe 2020-03-03Don't use $ inside $(()) 1.0p1June McEnroe 2020-03-03Use getoptsJune McEnroe 2020-01-28Call fopencookie with a+June McEnroe 2019-12-24Exit git-fetch-email on getopt failure 1.0June McEnroe 2019-12-23Export References headerJune McEnroe 2019-12-23Add (GNU/)Linux compatibilityJune McEnroe 2019-12-23Handle folded From headersJune McEnroe 2019-12-23Restrict search to plain-text messagesJune McEnroe 2019-12-23Properly support using drill rather than digJune McEnroe 2019-12-22Document dig requirement in imbox(1)June McEnroe 2019-12-22Add CAVEAT about expecting plain-textJune McEnroe 2019-12-22Quote user, pass and mailboxJune McEnroe 2019-12-22Use sequence numbers rather than UIDsJune McEnroe 2019-12-22Use EXAMINE rather than SELECTJune McEnroe 2019-12-22Export To and CC headersJune McEnroe 2019-12-22Add missing includeJune McEnroe 2019-12-22Export In-Reply-To headersJune McEnroe 2019-12-21Add git-fetch-email to READMEJune McEnroe 2019-12-21Clarify purpose in READMEJune McEnroe 2019-12-21Add READMEJune McEnroe 2019-12-21Add copyright header to git-fetch-emailJune McEnroe 2019-12-21Add git-fetch-email to SEE ALSO of imboxJune McEnroe 2019-12-21Add git-fetch-email wrapperJune McEnroe 2019-12-21Determine host by SRV lookupJune McEnroe 2019-12-21Clean up remaining codeJune McEnroe 2019-12-21Clean up mboxrd codeJune McEnroe 2019-12-21Convert CRLF to LFJune McEnroe 2019-12-21Implement -CFSTJune McEnroe 2019-12-21Rewrite aspirational manualJune McEnroe 2019-12-21Null-terminate read literalsJune McEnroe