or uclient-fetch will stall until timeout for 2XX (except 204) response
with content-length of 0
Signed-off-by: Youfu Zhang <zhangyoufu@gmail.com>
if (uh->eof || seq != uh->uc.seq)
return;
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);
}
uh->eof = true;
uclient_notify_eof(uh);
}