libmicrohttpd

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

commit afb01406a3d32b3bf0094f2d40e0e738bd34e7d9
parent 1a3cf8efd044946b71b1c76a894bb041ee583d51
Author: Christian Grothoff <christian@grothoff.org>
Date:   Fri, 11 Jan 2013 22:34:56 +0000

return success even without optional \r\n

Diffstat:
MChangeLog | 4++++
Msrc/daemon/postprocessor.c | 4+++-
Msrc/include/microhttpd.h | 2+-
3 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -1,3 +1,7 @@ +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 diff --git a/src/daemon/postprocessor.c b/src/daemon/postprocessor.c @@ -1065,7 +1065,9 @@ MHD_destroy_post_processor (struct MHD_PostProcessor *pp) /* These internal strings need cleaning up since the post-processing may have been interrupted at any stage */ - if ((pp->xbuf_pos > 0) || (pp->state != PP_Done)) + if ((pp->xbuf_pos > 0) || + ( (pp->state != PP_Done) && + (pp->state != PP_ExpectNewLine))) ret = MHD_NO; else ret = MHD_YES; diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h @@ -106,7 +106,7 @@ extern "C" /** * Current version of the library. */ -#define MHD_VERSION 0x00091801 +#define MHD_VERSION 0x00091802 /** * MHD-internal return code for "YES".