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:
efdfa39
)
check for length > 0 before calling ustream_write
author
Felix Fietkau
<nbd@openwrt.org>
Sat, 22 Mar 2014 17:21:01 +0000
(18:21 +0100)
committer
Felix Fietkau
<nbd@openwrt.org>
Sat, 22 Mar 2014 17:21:01 +0000
(18:21 +0100)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
uclient-http.c
patch
|
blob
|
history
diff --git
a/uclient-http.c
b/uclient-http.c
index c3d1d5a7e06d04a8ae4d1e3a384e6bf289d60f9b..c344513d8c7c4722e1a34f3f03e6d016a4eb0f8a 100644
(file)
--- a/
uclient-http.c
+++ b/
uclient-http.c
@@
-741,7
+741,8
@@
uclient_http_send_data(struct uclient *cl, char *buf, unsigned int len)
uclient_http_send_headers(uh);
ustream_printf(uh->us, "%X\r\n", len);
- ustream_write(uh->us, buf, len, false);
+ if (len > 0)
+ ustream_write(uh->us, buf, len, false);
ustream_printf(uh->us, "\r\n");
return len;