Christian Grothoff 17 лет назад
Родитель
Сommit
e524c3f356
6 измененных файлов с 36 добавлено и 7 удалено
  1. 4 0
      ChangeLog
  2. 2 2
      configure.ac
  3. 14 2
      doc/microhttpd.texi
  4. 1 1
      src/daemon/Makefile.am
  5. 9 1
      src/daemon/postprocessor.c
  6. 6 1
      src/include/microhttpd.h

+ 4 - 0
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

+ 2 - 2
configure.ac

@@ -21,8 +21,8 @@
 #
 #
 AC_PREREQ(2.57)
-AC_INIT([libmicrohttpd], [0.3.0],[[email protected]])
-AM_INIT_AUTOMAKE([libmicrohttpd], [0.3.0])
+AC_INIT([libmicrohttpd], [0.3.1],[[email protected]])
+AM_INIT_AUTOMAKE([libmicrohttpd], [0.3.1])
 AM_CONFIG_HEADER([config.h])
 
 AH_TOP([#define _GNU_SOURCE  1])

+ 14 - 2
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
 
 

+ 1 - 1
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 \

+ 9 - 1
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 */

+ 6 - 1
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 */