libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit f35fdf4b7c6f09557a6ac72e3550bcdbf6936f47
parent af157f337a92dc3ab59286c45ca7c0cb52d165c1
Author: Christian Grothoff <christian@grothoff.org>
Date:   Mon,  6 May 2013 10:49:23 +0000

-fixing #2859

Diffstat:
MChangeLog | 3+++
Msrc/microhttpd/connection.c | 6++++++
2 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -1,3 +1,6 @@ +Mon May 6 12:49:01 CEST 2013 + Fixing #2859. -CG + Sun May 5 21:44:08 CEST 2013 Merged libmicrospdy code with libmicrohttpd build system (no major changes to libmicrospdy itself yet). -CG diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c @@ -2034,6 +2034,12 @@ MHD_connection_handle_write (struct MHD_Connection *connection) pthread_mutex_unlock (&response->mutex); break; } + if (response->data_size == connection->response_write_position - response->data_start) + { + /* nothing to transmit, move on */ + connection->state = MHD_CONNECTION_BODY_SENT; + return MHD_YES; + } ret = connection->send_cls (connection, &response->data [connection->response_write_position