commit e524c3f356b22bba89ccee04e740e10c5ed0e77e
parent dd433c0f8c77fa20626d57a9aece6bf5b9c1e62c
Author: Christian Grothoff <christian@grothoff.org>
Date: Mon, 26 May 2008 19:32:00 +0000
releasing 0.3.1
Diffstat:
6 files changed, 36 insertions(+), 7 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,3 +1,7 @@
+Mon May 26 13:28:57 MDT 2008
+ Updated and improved documentation.
+ Releasing GNU libmicrohttpd 0.3.1. -CG
+
Fri May 23 16:54:41 MDT 2008
Fixed issue with postprocessor not handling URI-encoded
values of more than 1024 bytes correctly. -CG
diff --git a/configure.ac b/configure.ac
@@ -21,8 +21,8 @@
#
#
AC_PREREQ(2.57)
-AC_INIT([libmicrohttpd], [0.3.0],[libmicrohttpd@gnunet.org])
-AM_INIT_AUTOMAKE([libmicrohttpd], [0.3.0])
+AC_INIT([libmicrohttpd], [0.3.1],[libmicrohttpd@gnunet.org])
+AM_INIT_AUTOMAKE([libmicrohttpd], [0.3.1])
AM_CONFIG_HEADER([config.h])
AH_TOP([#define _GNU_SOURCE 1])
diff --git a/doc/microhttpd.texi b/doc/microhttpd.texi
@@ -1025,6 +1025,7 @@ access_handler (void *cls,
@}
else
@{
+ MHD_destroy_post_processor(pp);
return MHD_queue_response(...);
@}
@}
@@ -1094,8 +1095,19 @@ Return @code{MHD_YES} on success, @code{MHD_NO} on error
@end deftypefun
-@deftypefun void MHD_destroy_post_processor (struct MHD_PostProcessor *pp)
-Release PostProcessor resources.
+@deftypefun int MHD_destroy_post_processor (struct MHD_PostProcessor *pp)
+Release PostProcessor resources. After this function is being called,
+the PostProcessor is guaranteed to no longer call its iterator. There
+is no special call to the iterator to indicate the end of the post processing
+stream. After destroying the PostProcessor, the programmer should
+perform any necessary work to complete the processing of the iterator.
+
+Return @code{MHD_YES} if processing completed nicely, @code{MHD_NO}
+if there were spurious characters or formatting problems with
+the post request. It is common to ignore the return value
+of this function.
+
+
@end deftypefun
diff --git a/src/daemon/Makefile.am b/src/daemon/Makefile.am
@@ -12,7 +12,7 @@ lib_LTLIBRARIES = \
libmicrohttpd.la
libmicrohttpd_la_LDFLAGS = \
- -export-dynamic -version-info 4:2:0 $(retaincommand)
+ -export-dynamic -version-info 4:3:0 $(retaincommand)
libmicrohttpd_la_SOURCES = \
connection.c connection.h \
reason_phrase.c reason_phrase.h \
diff --git a/src/daemon/postprocessor.c b/src/daemon/postprocessor.c
@@ -1018,17 +1018,25 @@ MHD_post_process (struct MHD_PostProcessor *pp,
/**
* Release PostProcessor resources.
*/
-void
+int
MHD_destroy_post_processor (struct MHD_PostProcessor *pp)
{
+ int ret;
+
/* 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) )
+ ret = MHD_NO;
+ else
+ ret = MHD_YES;
pp->have = NE_none;
free_unmarked (pp);
if (pp->nested_boundary != NULL)
free (pp->nested_boundary);
free (pp);
+ return ret;
}
/* end of postprocessor.c */
diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h
@@ -851,8 +851,13 @@ MHD_post_process (struct MHD_PostProcessor *pp,
/**
* Release PostProcessor resources.
+ *
+ * @return MHD_YES if processing completed nicely,
+ * MHD_NO if there were spurious characters / formatting
+ * problems; it is common to ignore the return
+ * value of this function
*/
-void MHD_destroy_post_processor (struct MHD_PostProcessor *pp);
+int MHD_destroy_post_processor (struct MHD_PostProcessor *pp);
#if 0 /* keep Emacsens' auto-indent happy */