summary refs log tree commit diff
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2020-05-09 18:29:25 +0200
committerLeah Neukirchen <leah@vuxu.org>2020-05-09 18:29:25 +0200
commitd537da07206a6890855a83422f6cbe52d5328bcb (patch)
tree4f9549860eba7173e19daa61abded55eeab6f841
parenteb7bc9037a76f2a3bfdf68af2be9d49a3af8aacd (diff)
downloadhittpd-d537da07206a6890855a83422f6cbe52d5328bcb.tar.gz
hittpd-d537da07206a6890855a83422f6cbe52d5328bcb.tar.xz
hittpd-d537da07206a6890855a83422f6cbe52d5328bcb.zip
send content for 301 responses
-rw-r--r--hittpd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/hittpd.c b/hittpd.c
index 415431e..4ff5ebe 100644
--- a/hittpd.c
+++ b/hittpd.c
@@ -337,7 +337,8 @@ send_dir_redirect(http_parser *p)
 	char headers[PATH_MAX + 64];
 	snprintf(headers, sizeof headers, "Location: %s/\r\n", data->path);
 
-	send_response(p, 301, "Moved Permanently", headers, "");
+	send_response(p, 301, "Moved Permanently", headers,
+	    "301 Moved Permanently");
 }
 
 void
@@ -353,7 +354,7 @@ send_not_modified(http_parser *p, time_t modified)
 void
 send_rns(http_parser *p, off_t filesize)
 {
-	char headers[PATH_MAX + 64];
+	char headers[64];
 	snprintf(headers, sizeof headers, "Content-Range: bytes */%jd\r\n",
 	    (intmax_t)filesize);