[OpenWrt-Devel] [PATCH 1/2] uhttpd: use separate ustream for chunked transfer encoding

Felix Fietkau nbd at openwrt.org
Sun Nov 22 07:03:32 EST 2015

On 2015-10-02 00:22, Andrej Krpic wrote:
> Hi,
> this patch simplifies chunk printing when chunked transfer encoding is used
> in a response... And it comes handy when gzip content encoding will be used.
> Signed-off-by: Andrej Krpic <ak77 at tnode.com>
I like the idea, there's one change I'd like you to make to it though:
Please add a pointer to the client struct cl->us_data and make that
point to cl->us for the non-chunked case and &cl->chunked for the
chunked case. That way you can avoid repeating the tests for chunked
encoding in the places that write data.
This will also simplify the follow-up patch with gzip encoding by
getting rid of some unnecessary #if tests.

- Felix
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org

More information about the openwrt-devel mailing list