libmicrohttpd

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

commit b1a0a07b651b74b0475bb109f573ac6983e7036f
parent afb01406a3d32b3bf0094f2d40e0e738bd34e7d9
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sat, 26 Jan 2013 20:42:29 +0000

fixing regression from January 6th

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

diff --git a/ChangeLog b/ChangeLog @@ -1,10 +1,14 @@ +Sat Jan 26 21:26:48 CET 2013 + Fixing regression introduced Jan 6 (test on data_size instead + of total_size. -CG + Fri Jan 11 23:21:55 CET 2013 Also return MHD_YES from MHD_destroy_post_processor if we did not get '\r\n' in the upload. -CG Sun Jan 6 21:10:13 CET 2013 Enable use of "MHD_create_response_from_callback" with - body size of zeor. -CG + body size of zero. -CG Tue Dec 25 16:16:30 CET 2012 Releasing libmicrohttpd 0.9.24. -CG diff --git a/src/daemon/connection.c b/src/daemon/connection.c @@ -370,7 +370,7 @@ try_ready_normal_body (struct MHD_Connection *connection) response = connection->response; if (NULL == response->crc) return MHD_YES; - if (0 == response->data_size) + if (0 == response->total_size) return MHD_YES; /* 0-byte response is always ready */ if ( (response->data_start <= connection->response_write_position) && @@ -479,7 +479,7 @@ try_ready_chunked_body (struct MHD_Connection *connection) else { /* buffer not in range, try to fill it */ - if (0 == response->data_size) + if (0 == response->total_size) ret = 0; /* response must be empty, don't bother calling crc */ else ret = response->crc (response->crc_cls, @@ -496,7 +496,7 @@ try_ready_chunked_body (struct MHD_Connection *connection) return MHD_NO; } if ( (MHD_CONTENT_READER_END_OF_STREAM == ret) || - (0 == response->data_size) ) + (0 == response->total_size) ) { /* end of message, signal other side! */ strcpy (connection->write_buffer, "0\r\n"); diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h @@ -1026,7 +1026,7 @@ typedef void * POST data. * * @param cls user-specified closure - * @param kind type of the value + * @param kind type of the value, always MHD_POSTDATA_KIND when called from MHD * @param key 0-terminated key for the value * @param filename name of the uploaded file, NULL if not known * @param content_type mime-type of the data, NULL if not known