diff options
Diffstat (limited to 'gweb')
-rw-r--r-- | gweb/gweb.c | 8 |
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; } |