From d537da07206a6890855a83422f6cbe52d5328bcb Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Sat, 9 May 2020 18:29:25 +0200 Subject: send content for 301 responses --- hittpd.c | 5 +++-- 1 file 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); -- cgit 1.4.1