diff options
author | Felix Fietkau <nbd@openwrt.org> | 2015-11-08 20:22:18 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2015-11-08 20:22:18 +0100 |
commit | 6e89d6449c6f1db278dfe4bd51fb6d0c4b932363 (patch) | |
tree | e92f43afe7146244af6e0a47bcc51c51c12edb13 | |
parent | 23b521b8840c959b1bb60b12b3c5c2cf5e00d649 (diff) |
handler: only send content-length header when not using chunked transfer
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
-rw-r--r-- | handler.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -61,7 +61,8 @@ handle_redirect(struct json_script_ctx *ctx, struct blob_attr *data) } uh_http_header(cl, code, status); - 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\r\n\r\n", blobmsg_get_string(tb[0])); uh_request_done(cl); |