gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r37545 - in libmicrohttpd: . src/include src/microhttpd


From: gnunet
Subject: [GNUnet-SVN] r37545 - in libmicrohttpd: . src/include src/microhttpd
Date: Sat, 16 Jul 2016 21:56:26 +0200

Author: grothoff
Date: 2016-07-16 21:56:26 +0200 (Sat, 16 Jul 2016)
New Revision: 37545

Modified:
   libmicrohttpd/ChangeLog
   libmicrohttpd/src/include/microhttpd.h
   libmicrohttpd/src/microhttpd/connection.c
Log:
print warning if application code performing connection POST processing is buggy

Modified: libmicrohttpd/ChangeLog
===================================================================
--- libmicrohttpd/ChangeLog     2016-07-15 21:42:10 UTC (rev 37544)
+++ libmicrohttpd/ChangeLog     2016-07-16 19:56:26 UTC (rev 37545)
@@ -1,3 +1,8 @@
+Sat Jul 16 21:54:49 CEST 2016
+       Warn user if they sent connection into blocking
+       state by not processing all POST data, not suspending,
+       and not running in external select mode. -CG
+
 Fri Jul  8 21:35:07 CEST 2016
        Fix FIXME in tutorial. -CG
 

Modified: libmicrohttpd/src/include/microhttpd.h
===================================================================
--- libmicrohttpd/src/include/microhttpd.h      2016-07-15 21:42:10 UTC (rev 
37544)
+++ libmicrohttpd/src/include/microhttpd.h      2016-07-16 19:56:26 UTC (rev 
37545)
@@ -130,7 +130,7 @@
  * Current version of the library.
  * 0x01093001 = 1.9.30-1.
  */
-#define MHD_VERSION 0x00095000
+#define MHD_VERSION 0x00095001
 
 /**
  * MHD-internal return code for "YES".

Modified: libmicrohttpd/src/microhttpd/connection.c
===================================================================
--- libmicrohttpd/src/microhttpd/connection.c   2016-07-15 21:42:10 UTC (rev 
37544)
+++ libmicrohttpd/src/microhttpd/connection.c   2016-07-16 19:56:26 UTC (rev 
37545)
@@ -1794,7 +1794,19 @@
 #endif
                   );
       if (0 != processed)
-        instant_retry = MHD_NO; /* client did not process everything */
+       {
+         instant_retry = MHD_NO; /* client did not process everything */
+#ifdef HAVE_MESSAGES
+         /* client did not process all POST data, complain if
+            the setup was incorrect, which may prevent us from
+            handling the rest of the request */
+         if ( ( (0 != (connection->daemon->options & 
MHD_USE_THREAD_PER_CONNECTION)) ||
+                (0 != (connection->daemon->options & 
MHD_USE_SELECT_INTERNALLY)) ) &&
+              (MHD_NO == connection->suspended) )
+           MHD_DLOG (connection->daemon,
+                     "WARNING: incomplete POST processing and connection not 
suspended will result in hung connection.\n");
+       }
+#endif
       used -= processed;
       if (connection->have_chunked_upload == MHD_YES)
         connection->current_chunk_offset += used;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]