summary refs log tree commit diff
path: root/hittpd.c
diff options
context:
space:
mode:
Diffstat (limited to 'hittpd.c')
-rw-r--r--hittpd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hittpd.c b/hittpd.c
index 4ff5ebe..13306fe 100644
--- a/hittpd.c
+++ b/hittpd.c
@@ -279,14 +279,14 @@ send_response(http_parser *p, int status, const char *msg,
 	char now[64];
 	httpdate(time(0), now);
 
-	if (p->method == HTTP_HEAD)
-		content = "";
-
 	if (content) {
 		data->first = 0;
 		data->last = strlen(content);
 	}
 
+	if (p->method == HTTP_HEAD)
+		content = "";
+
 	int len = 0;
 
 	len += snprintf(buf, sizeof buf,