file: do not emit Content-Length header for 304/412 responses
authorJo-Philipp Wich <jow@openwrt.org>
Mon, 27 Oct 2014 10:19:07 +0000 (11:19 +0100)
committerJo-Philipp Wich <jow@openwrt.org>
Mon, 27 Oct 2014 10:19:07 +0000 (11:19 +0100)
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
file.c

diff --git a/file.c b/file.c
index 055035eb7f715cd636918c2be75738c8338cb818..6b3bb823b981a6f3a0ba26d6f2446b1e3a429762 100644 (file)
--- a/file.c
+++ b/file.c
@@ -567,7 +567,6 @@ static void uh_file_data(struct client *cl, struct path_info *pi, int fd)
                !uh_file_if_range(cl, &pi->stat) ||
                !uh_file_if_unmodified_since(cl, &pi->stat) ||
                !uh_file_if_none_match(cl, &pi->stat)) {
-               ustream_printf(cl->us, "Content-Length: 0\r\n");
                ustream_printf(cl->us, "\r\n");
                uh_request_done(cl);
                close(fd);