[PATCH] uclient-http: set eof mark when content-length is 0
Baptiste Jonglez
baptiste at bitsofnetworks.org
Fri May 14 14:33:11 PDT 2021
Merged, thanks for the fix!
On 11-03-21, Youfu Zhang wrote:
> or uclient-fetch will stall until timeout for 2XX (except 204) response
> with content-length of 0
>
> Signed-off-by: Youfu Zhang <zhangyoufu at gmail.com>
> ---
> uclient-http.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/uclient-http.c b/uclient-http.c
> index 349e69c..c2bba6b 100644
> --- a/uclient-http.c
> +++ b/uclient-http.c
> @@ -655,7 +655,8 @@ static void uclient_http_headers_complete(struct uclient_http *uh)
> if (uh->eof || seq != uh->uc.seq)
> return;
>
> - if (uh->req_type == REQ_HEAD || uh->uc.status_code == 204) {
> + if (uh->req_type == REQ_HEAD || uh->uc.status_code == 204 ||
> + uh->content_length == 0) {
> uh->eof = true;
> uclient_notify_eof(uh);
> }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.openwrt.org/pipermail/openwrt-devel/attachments/20210514/13eaaeee/attachment.sig>
More information about the openwrt-devel
mailing list