summaryrefslogtreecommitdiff
path: root/gweb
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2010-11-08 10:05:35 +0900
committerMarcel Holtmann <marcel@holtmann.org>2010-11-08 10:05:35 +0900
commitdca0694329dd6326cdf2e38b2869413b7b0a939e (patch)
tree100a390f560cdf7315c1c9d115fa013a662980af /gweb
parent29d07a92570d56ce015c78939ffac26d771004bb (diff)
downloadconnman-dca0694329dd6326cdf2e38b2869413b7b0a939e.tar.gz
connman-dca0694329dd6326cdf2e38b2869413b7b0a939e.tar.bz2
connman-dca0694329dd6326cdf2e38b2869413b7b0a939e.zip
Don't report zero length success status back to client
Diffstat (limited to 'gweb')
-rw-r--r--gweb/gweb.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/gweb/gweb.c b/gweb/gweb.c
index 72c5cfdd..a348cddd 100644
--- a/gweb/gweb.c
+++ b/gweb/gweb.c
@@ -628,9 +628,11 @@ static int handle_body(struct web_session *session,
debug(session->web, "[body] length %zu", len);
if (session->result.use_chunk == FALSE) {
- session->result.buffer = buf;
- session->result.length = len;
- call_result_func(session, 0);
+ if (len > 0) {
+ session->result.buffer = buf;
+ session->result.length = len;
+ call_result_func(session, 0);
+ }
return 0;
}