projects
/
project
/
uclient.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
19571e4
)
uclient-http: set eof mark when content-length is 0
author
Youfu Zhang
<zhangyoufu@gmail.com>
Thu, 11 Mar 2021 12:58:33 +0000
(20:58 +0800)
committer
Baptiste Jonglez
<git@bitsofnetworks.org>
Fri, 14 May 2021 21:25:26 +0000
(23:25 +0200)
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>
uclient-http.c
patch
|
blob
|
history
diff --git
a/uclient-http.c
b/uclient-http.c
index 349e69cdd4aeb7a13859d0db71f5f277d3b7e580..c2bba6b5b8f2093e3b408d6d35a312673f821583 100644
(file)
--- 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);
}