diff options
author | Felix Fietkau <nbd@openwrt.org> | 2015-11-08 20:23:31 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2015-11-08 20:23:31 +0100 |
commit | fe01ef3f52adae9da38ef47926cd50974af5d6b7 (patch) | |
tree | 60abea2850a8383e784142306b8412249ca66fdd | |
parent | 6e89d6449c6f1db278dfe4bd51fb6d0c4b932363 (diff) |
file: on redirect, only send content-length header when not using chunked transfer
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
-rw-r--r-- | file.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -235,7 +235,8 @@ uh_path_lookup(struct client *cl, const char *url) url with trailing slash appended */ if (!slash) { uh_http_header(cl, 302, "Found"); - ustream_printf(cl->us, "Content-Length: 0\r\n"); + if (!uh_use_chunked(cl)) + ustream_printf(cl->us, "Content-Length: 0\r\n"); ustream_printf(cl->us, "Location: %s%s%s\r\n\r\n", &path_phys[docroot_len], p.query ? "?" : "", |