gnunet-svn
[Top][All Lists]
Advanced

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

[libmicrohttpd] branch master updated (e07c332c -> 2e40251a)


From: gnunet
Subject: [libmicrohttpd] branch master updated (e07c332c -> 2e40251a)
Date: Wed, 17 Mar 2021 19:39:39 +0100

This is an automated email from the git hooks/post-receive script.

karlson2k pushed a change to branch master
in repository libmicrohttpd.

    from e07c332c MHD_start_daemon(): warn if messages could be printed by 
wrong logger
     new d71df0f0 microhttpd.h: added notes about minimal MHD version for some 
symbols
     new 2e40251a Added MHD_OPTION_SIGPIPE_HANDLED_BY_APP option

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/include/microhttpd.h | 27 ++++++++++++++++++++++++---
 src/microhttpd/daemon.c  | 12 +++++++++++-
 2 files changed, 35 insertions(+), 4 deletions(-)

diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h
index 900bfd72..59170dfe 100644
--- a/src/include/microhttpd.h
+++ b/src/include/microhttpd.h
@@ -135,7 +135,7 @@ typedef intptr_t ssize_t;
  * they are parsed as decimal numbers.
  * Example: 0x01093001 = 1.9.30-1.
  */
-#define MHD_VERSION 0x00097204
+#define MHD_VERSION 0x00097205
 
 /**
  * Operational results from MHD calls.
@@ -1732,7 +1732,18 @@ enum MHD_OPTION
    * This argument must be followed by an "unsigned int", corresponding
    * to an `enum MHD_DisableSanityCheck`.
    */
-  MHD_OPTION_SERVER_INSANITY = 32
+  MHD_OPTION_SERVER_INSANITY = 32,
+
+  /**
+   * If followed by value '1' informs MHD that SIGPIPE is suppressed or
+   * handled by application. Allows MHD to use network functions that could
+   * generate SIGPIPE, like `sendfile()`.
+   * Valid only for daemons without #MHD_USE_INTERNAL_POLLING_THREAD as
+   * MHD automatically suppresses SIGPIPE for threads started by MHD.
+   * This option should be followed by an `int` argument.
+   * @note Available since #MHD_VERSION 0x00097205
+   */
+  MHD_OPTION_SIGPIPE_HANDLED_BY_APP = 33
 };
 
 
@@ -1977,6 +1988,7 @@ union MHD_ConnectionInfo
 
 /**
  * I/O vector type. Provided for use with #MHD_create_response_from_iovec().
+ * @note Available since #MHD_VERSION 0x00097204
  */
 struct MHD_IoVec
 {
@@ -2746,6 +2758,7 @@ MHD_get_connection_values (struct MHD_Connection 
*connection,
  * @param iterator_cls extra argument to @a iterator
  * @return number of entries iterated over,
  *         -1 if connection is NULL.
+ * @note Available since #MHD_VERSION 0x00096400
  * @ingroup request
  */
 _MHD_EXTERN int
@@ -2811,6 +2824,7 @@ MHD_set_connection_value (struct MHD_Connection 
*connection,
  * @return #MHD_NO if the operation could not be
  *         performed due to insufficient memory;
  *         #MHD_YES on success
+ * @note Available since #MHD_VERSION 0x00096400
  * @ingroup request
  */
 _MHD_EXTERN enum MHD_Result
@@ -3136,6 +3150,7 @@ MHD_create_response_from_buffer (size_t size,
  * @param buffer size bytes containing the response's data portion
  * @param crfc function to call to free the @a buffer
  * @return NULL on error (i.e. invalid arguments, out of memory)
+ * @note Available since #MHD_VERSION 0x00096000
  * @ingroup response
  */
 _MHD_EXTERN struct MHD_Response *
@@ -3169,6 +3184,7 @@ MHD_create_response_from_fd (size_t size,
  *        data; will be closed when response is destroyed;
  *        fd should be in 'blocking' mode
  * @return NULL on error (i.e. invalid arguments, out of memory)
+ * @note Available since #MHD_VERSION 0x00097102
  * @ingroup response
  */
 _MHD_EXTERN struct MHD_Response *
@@ -3260,6 +3276,7 @@ MHD_create_response_from_fd_at_offset64 (uint64_t size,
  *        the response is destroyed.
  * @param cls the argument passed to @a free_cb
  * @return NULL on error (i.e. invalid arguments, out of memory)
+ * @note Available since #MHD_VERSION 0x00097204
  * @ingroup response
  */
 _MHD_EXTERN struct MHD_Response *
@@ -3596,7 +3613,7 @@ MHD_digest_auth_get_username (struct MHD_Connection 
*connection);
  * Free the memory given by @a ptr. Calls "free(ptr)".  This function
  * should be used to free the username returned by
  * #MHD_digest_auth_get_username().
- * @note Since v0.9.56
+ * @note Available since #MHD_VERSION 0x00095600
  *
  * @param ptr pointer to free.
  */
@@ -3640,6 +3657,7 @@ enum MHD_DigestAuthAlgorithm
  * @param algo digest algorithms allowed for verification
  * @return #MHD_YES if authenticated, #MHD_NO if not,
  *      #MHD_INVALID_NONCE if nonce is invalid
+ * @note Available since #MHD_VERSION 0x00096200
  * @ingroup authentication
  */
 _MHD_EXTERN int
@@ -3692,6 +3710,7 @@ MHD_digest_auth_check (struct MHD_Connection *connection,
  * @param algo digest algorithms allowed for verification
  * @return #MHD_YES if authenticated, #MHD_NO if not,
  *      #MHD_INVALID_NONCE if nonce is invalid
+ * @note Available since #MHD_VERSION 0x00096200
  * @ingroup authentication
  */
 _MHD_EXTERN int
@@ -3719,6 +3738,7 @@ MHD_digest_auth_check_digest2 (struct MHD_Connection 
*connection,
  *      invalid in seconds
  * @return #MHD_YES if authenticated, #MHD_NO if not,
  *      #MHD_INVALID_NONCE if nonce is invalid
+ * @note Available since #MHD_VERSION 0x00096000
  * @ingroup authentication
  * @deprecated use #MHD_digest_auth_check_digest2()
  */
@@ -3743,6 +3763,7 @@ MHD_digest_auth_check_digest (struct MHD_Connection 
*connection,
  *      'stale=true' to the authentication header
  * @param algo digest algorithm to use
  * @return #MHD_YES on success, #MHD_NO otherwise
+ * @note Available since #MHD_VERSION 0x00096200
  * @ingroup authentication
  */
 _MHD_EXTERN enum MHD_Result
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index 535d85aa..0fe47228 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -238,7 +238,6 @@ MHD_default_logger_ (void *cls,
  * Free the memory given by @a ptr. Calls "free(ptr)".  This function
  * should be used to free the username returned by
  * #MHD_digest_auth_get_username().
- * @note Since v0.9.56
  *
  * @param ptr pointer to free.
  */
@@ -5850,6 +5849,7 @@ parse_options_va (struct MHD_Daemon *daemon,
           break;
         /* all options taking 'int' */
         case MHD_OPTION_STRICT_FOR_CLIENT:
+        case MHD_OPTION_SIGPIPE_HANDLED_BY_APP:
           if (MHD_NO == parse_options (daemon,
                                        servaddr,
                                        opt,
@@ -5928,6 +5928,16 @@ parse_options_va (struct MHD_Daemon *daemon,
       return MHD_NO;
 #endif
 #endif /* HTTPS_SUPPORT */
+    case MHD_OPTION_SIGPIPE_HANDLED_BY_APP:
+      if (0 == (daemon->options & MHD_USE_INTERNAL_POLLING_THREAD))
+        daemon->sigpipe_blocked = ( (va_arg (ap,
+                                             int)) != 0);
+      else
+      {
+        (void) va_arg (ap,
+                       int);
+      }
+      break;
     default:
 #ifdef HAVE_MESSAGES
       if ( ( (opt >= MHD_OPTION_HTTPS_MEM_KEY) &&

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

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