When a backend CGI, Lua or ucode handler produces a response which either
includes a Content-Length or a Transfer-Encoding header then disable the
uhttpd side chunked transfer encoding and assume the backend response to
be already properly encoded or length delimitted.
Fixes: https://github.com/openwrt/luci/issues/7655
Signed-off-by: Jo-Philipp Wich <[email protected]>
cl->dispatch.proc.status_code = atoi(buf);
return;
}
+ else if (!strcasecmp(name, "Content-Length") ||
+ !strcasecmp(name, "Transfer-Encoding")) {
+ cl->request.disable_chunked = true;
+ }
blobmsg_add_string(&cl->dispatch.proc.hdr, name, val);
}