gnunet-svn
[Top][All Lists]
Advanced

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

[libmicrohttpd] branch master updated (b908403e -> 1907cc2b)


From: gnunet
Subject: [libmicrohttpd] branch master updated (b908403e -> 1907cc2b)
Date: Sun, 17 Apr 2022 14:26:57 +0200

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

karlson2k pushed a change to branch master
in repository libmicrohttpd.

    from b908403e configure: set minimal supported OS version in W32 binaries
     new 3c9f681e configure: fixed broken configure due to the missing value
     new 4e34b6a4 configure: minor fix
     new e76fc7f8 daemon: muted compiler warning
     new 3ebb9829 Refactoring: different types for response and request headers
     new 2cef909c test_postprocessor_amp: fixed code style
     new 36cf2f2d connection: removed drop of 'const' qualifier
     new 1907cc2b MHD_Connection: added 'const' qualifiers to some unmodifiable 
members

The 7 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:
 configure.ac                              |  8 ++--
 src/microhttpd/connection.c               | 32 +++++++--------
 src/microhttpd/daemon.c                   |  3 ++
 src/microhttpd/digestauth.c               |  4 +-
 src/microhttpd/internal.h                 | 66 +++++++++++++++++++++++++------
 src/microhttpd/response.c                 | 28 ++++++-------
 src/microhttpd/response.h                 |  2 +-
 src/microhttpd/test_postprocessor.c       | 32 +++++++--------
 src/microhttpd/test_postprocessor_amp.c   | 10 ++---
 src/microhttpd/test_postprocessor_large.c |  4 +-
 10 files changed, 114 insertions(+), 75 deletions(-)

diff --git a/configure.ac b/configure.ac
index cbafd7d9..29eaf7db 100644
--- a/configure.ac
+++ b/configure.ac
@@ -172,8 +172,7 @@ AS_VAR_IF([enable_build_type],["debug"],
 AS_CASE([${enable_build_type}],[release|release-*],
   [ # All release types
     CFLAGS="${user_CFLAGS}"
-    AS_VAR_IF([enable_build_type],
-      [release-compact],
+    AS_VAR_IF([enable_build_type],["release-compact"],
       [
         AC_CHECK_DECL([MHD_FAVOR_SMALL_CODE],[],
           [AC_CHECK_DECL([MHD_FAVOR_FAST_CODE],[],
@@ -197,13 +196,12 @@ AS_CASE([${enable_build_type}],[release|release-*],
       ]
     )
 
-    AS_VAR_IF([enable_build_type],
-      [release-hardened],
+    AS_VAR_IF([enable_build_type],["release-hardened"],
       [
         MHD_CHECK_ADD_CC_CFLAGS([-Wformat-security -Wstack-protector], 
[CFLAGS_ac])
       ]
     )
-    AS_VAR_IF([enable_build_type],
+    AS_VAR_IF([enable_build_type],["release"],
       [ # Flags are not suitable for 'compact' and for 'hardened'
         MHD_CHECK_ADD_CC_CFLAGS([-ffast-math -fno-trapping-math], [CFLAGS_ac])
       ]
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index 513d6415..36e74900 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -387,7 +387,7 @@ MHD_get_connection_values (struct MHD_Connection 
*connection,
                            void *iterator_cls)
 {
   int ret;
-  struct MHD_HTTP_Header *pos;
+  struct MHD_HTTP_Req_Header *pos;
 
   if (NULL == connection)
     return -1;
@@ -426,7 +426,7 @@ MHD_get_connection_values_n (struct MHD_Connection 
*connection,
                              void *iterator_cls)
 {
   int ret;
-  struct MHD_HTTP_Header *pos;
+  struct MHD_HTTP_Req_Header *pos;
 
   if (NULL == connection)
     return -1;
@@ -480,15 +480,15 @@ MHD_set_connection_value_n_nocheck_ (struct 
MHD_Connection *connection,
                                      const char *value,
                                      size_t value_size)
 {
-  struct MHD_HTTP_Header *pos;
+  struct MHD_HTTP_Req_Header *pos;
 
   pos = connection_alloc_memory (connection,
-                                 sizeof (struct MHD_HTTP_Header));
+                                 sizeof (struct MHD_HTTP_Res_Header));
   if (NULL == pos)
     return MHD_NO;
-  pos->header = (char *) key;
+  pos->header = key;
   pos->header_size = key_size;
-  pos->value = (char *) value;
+  pos->value = value;
   pos->value_size = value_size;
   pos->kind = kind;
   pos->next = NULL;
@@ -653,7 +653,7 @@ MHD_lookup_connection_value_n (struct MHD_Connection 
*connection,
                                const char **value_ptr,
                                size_t *value_size_ptr)
 {
-  struct MHD_HTTP_Header *pos;
+  struct MHD_HTTP_Req_Header *pos;
 
   if (NULL == connection)
     return MHD_NO;
@@ -716,14 +716,10 @@ MHD_lookup_header_token_ci (const struct MHD_Connection 
*connection,
                             const char *token,
                             size_t token_len)
 {
-  struct MHD_HTTP_Header *pos;
-
-  if ((NULL == connection) || (NULL == header) || (0 == header[0]) || (NULL ==
-                                                                       token) 
||
-      (0 ==
-       token
-       [
-         0]) )
+  struct MHD_HTTP_Req_Header *pos;
+
+  if ((NULL == connection) || (NULL == header) || (0 == header[0]) ||
+      (NULL == token) || (0 == token[0]))
     return false;
 
   for (pos = connection->headers_received; NULL != pos; pos = pos->next)
@@ -1934,7 +1930,7 @@ add_user_headers (char *buf,
                   bool add_keep_alive)
 {
   struct MHD_Response *const r = response; /**< a short alias */
-  struct MHD_HTTP_Header *hdr; /**< Iterates through User-specified headers */
+  struct MHD_HTTP_Res_Header *hdr; /**< Iterates through User-specified 
headers */
   size_t el_size; /**< the size of current element to be added to the @a buf */
 
   mhd_assert (! add_close || ! add_keep_alive);
@@ -2276,7 +2272,7 @@ build_connection_chunked_response_footer (struct 
MHD_Connection *connection)
   size_t buf_size;     /**< the size of the @a buf */
   size_t used_size;    /**< the used size of the @a buf */
   struct MHD_Connection *const c = connection; /**< a short alias */
-  struct MHD_HTTP_Header *pos;
+  struct MHD_HTTP_Res_Header *pos;
 
   mhd_assert (connection->rp_props.chunked);
   /* TODO: allow combining of the final footer with the last chunk,
@@ -5219,7 +5215,7 @@ MHD_queue_response (struct MHD_Connection *connection,
 #ifdef UPGRADE_SUPPORT
   if (NULL != response->upgrade_handler)
   {
-    struct MHD_HTTP_Header *conn_header;
+    struct MHD_HTTP_Res_Header *conn_header;
     if (0 == (daemon->options & MHD_ALLOW_UPGRADE))
     {
 #ifdef HAVE_MESSAGES
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index 72ba708a..1cca1b30 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -325,6 +325,9 @@ MHD_ip_addr_to_key (const struct sockaddr *addr,
                     socklen_t addrlen,
                     struct MHD_IPCount *key)
 {
+#ifndef DEBUG
+  (void) addrlen; /* Mute compiler warning */
+#endif /* DEBUG */
   memset (key,
           0,
           sizeof(*key));
diff --git a/src/microhttpd/digestauth.c b/src/microhttpd/digestauth.c
index a3244188..8526ae40 100644
--- a/src/microhttpd/digestauth.c
+++ b/src/microhttpd/digestauth.c
@@ -737,7 +737,7 @@ test_header (struct MHD_Connection *connection,
              size_t value_size,
              enum MHD_ValueKind kind)
 {
-  struct MHD_HTTP_Header *pos;
+  struct MHD_HTTP_Req_Header *pos;
 
   for (pos = connection->headers_received; NULL != pos; pos = pos->next)
   {
@@ -780,7 +780,7 @@ static enum MHD_Result
 check_argument_match (struct MHD_Connection *connection,
                       const char *args)
 {
-  struct MHD_HTTP_Header *pos;
+  struct MHD_HTTP_Req_Header *pos;
   char *argb;
   unsigned int num_headers;
   enum MHD_Result ret;
diff --git a/src/microhttpd/internal.h b/src/microhttpd/internal.h
index 20a406e3..50c1a1ec 100644
--- a/src/microhttpd/internal.h
+++ b/src/microhttpd/internal.h
@@ -276,19 +276,19 @@ MHD_DLOG (const struct MHD_Daemon *daemon,
 
 
 /**
- * Header or cookie in HTTP request or response.
+ * Header or footer for HTTP response.
  */
-struct MHD_HTTP_Header
+struct MHD_HTTP_Res_Header
 {
   /**
    * Headers are kept in a double-linked list.
    */
-  struct MHD_HTTP_Header *next;
+  struct MHD_HTTP_Res_Header *next;
 
   /**
    * Headers are kept in a double-linked list.
    */
-  struct MHD_HTTP_Header *prev;
+  struct MHD_HTTP_Res_Header *prev;
 
   /**
    * The name of the header (key), without the colon.
@@ -311,8 +311,50 @@ struct MHD_HTTP_Header
   size_t value_size;
 
   /**
-   * Type of the header (where in the HTTP protocol is this header
-   * from).
+   * Type of the value.
+   */
+  enum MHD_ValueKind kind;
+
+};
+
+
+/**
+ * Header, footer, or cookie for HTTP request.
+ */
+struct MHD_HTTP_Req_Header
+{
+  /**
+   * Headers are kept in a double-linked list.
+   */
+  struct MHD_HTTP_Req_Header *next;
+
+  /**
+   * Headers are kept in a double-linked list.
+   */
+  struct MHD_HTTP_Req_Header *prev;
+
+  /**
+   * The name of the header (key), without the colon.
+   */
+  const char *header;
+
+  /**
+   * The length of the @a header, not including the final zero termination.
+   */
+  size_t header_size;
+
+  /**
+   * The value of the header.
+   */
+  const char *value;
+
+  /**
+   * The length of the @a value, not including the final zero termination.
+   */
+  size_t value_size;
+
+  /**
+   * Type of the value.
    */
   enum MHD_ValueKind kind;
 
@@ -396,12 +438,12 @@ struct MHD_Response
   /**
    * Head of double-linked list of headers to send for the response.
    */
-  struct MHD_HTTP_Header *first_header;
+  struct MHD_HTTP_Res_Header *first_header;
 
   /**
    * Tail of double-linked list of headers to send for the response.
    */
-  struct MHD_HTTP_Header *last_header;
+  struct MHD_HTTP_Res_Header *last_header;
 
   /**
    * Buffer pointing to data that we are supposed
@@ -915,12 +957,12 @@ struct MHD_Connection
   /**
    * Linked list of parsed headers.
    */
-  struct MHD_HTTP_Header *headers_received;
+  struct MHD_HTTP_Req_Header *headers_received;
 
   /**
    * Tail of linked list of parsed headers.
    */
-  struct MHD_HTTP_Header *headers_received_tail;
+  struct MHD_HTTP_Req_Header *headers_received_tail;
 
   /**
    * Response to transmit (initially NULL).
@@ -957,7 +999,7 @@ struct MHD_Connection
   /**
    * Request method.  Should be GET/POST/etc.  Allocated in pool.
    */
-  char *method;
+  const char *method;
 
   /**
    * The request method as enum.
@@ -974,7 +1016,7 @@ struct MHD_Connection
    * HTTP version string (i.e. http/1.1).  Allocated
    * in pool.
    */
-  char *version;
+  const char *version;
 
   /**
    * HTTP protocol version as enum.
diff --git a/src/microhttpd/response.c b/src/microhttpd/response.c
index c604e14e..8ac0c58e 100644
--- a/src/microhttpd/response.c
+++ b/src/microhttpd/response.c
@@ -159,7 +159,7 @@ add_response_entry (struct MHD_Response *response,
                     const char *header,
                     const char *content)
 {
-  struct MHD_HTTP_Header *hdr;
+  struct MHD_HTTP_Res_Header *hdr;
 
   if ( (NULL == response) ||
        (NULL == header) ||
@@ -173,7 +173,7 @@ add_response_entry (struct MHD_Response *response,
        (NULL != strchr (content, '\r')) ||
        (NULL != strchr (content, '\n')) )
     return MHD_NO;
-  if (NULL == (hdr = MHD_calloc_ (1, sizeof (struct MHD_HTTP_Header))))
+  if (NULL == (hdr = MHD_calloc_ (1, sizeof (struct MHD_HTTP_Res_Header))))
     return MHD_NO;
   if (NULL == (hdr->header = strdup (header)))
   {
@@ -218,7 +218,7 @@ add_response_header_connection (struct MHD_Response 
*response,
   size_t buf_size;   /**< the size of the buffer */
   ssize_t norm_len;  /**< the length of the normalised value */
   char *buf;         /**< the temporal buffer */
-  struct MHD_HTTP_Header *hdr; /**< existing "Connection" header */
+  struct MHD_HTTP_Res_Header *hdr; /**< existing "Connection" header */
   bool value_has_close; /**< the @a value has "close" token */
   bool already_has_close; /**< existing "Connection" header has "close" token 
*/
   size_t pos = 0;   /**< position of addition in the @a buf */
@@ -340,9 +340,9 @@ add_response_header_connection (struct MHD_Response 
*response,
 
   if (NULL == hdr)
   {
-    struct MHD_HTTP_Header *new_hdr; /**< new "Connection" header */
+    struct MHD_HTTP_Res_Header *new_hdr; /**< new "Connection" header */
     /* Create new response header entry */
-    new_hdr = MHD_calloc_ (1, sizeof (struct MHD_HTTP_Header));
+    new_hdr = MHD_calloc_ (1, sizeof (struct MHD_HTTP_Res_Header));
     if (NULL != new_hdr)
     {
       new_hdr->header = malloc (key_len + 1);
@@ -390,7 +390,7 @@ static enum MHD_Result
 del_response_header_connection (struct MHD_Response *response,
                                 const char *value)
 {
-  struct MHD_HTTP_Header *hdr; /**< existing "Connection" header */
+  struct MHD_HTTP_Res_Header *hdr; /**< existing "Connection" header */
 
   hdr = MHD_get_response_element_n_ (response, MHD_HEADER_KIND,
                                      MHD_HTTP_HEADER_CONNECTION,
@@ -522,7 +522,7 @@ MHD_add_response_header (struct MHD_Response *response,
   {
     if (0 != (response->flags_auto & MHD_RAF_HAS_DATE_HDR))
     {
-      struct MHD_HTTP_Header *hdr;
+      struct MHD_HTTP_Res_Header *hdr;
       hdr = MHD_get_response_element_n_ (response, MHD_HEADER_KIND,
                                          MHD_HTTP_HEADER_DATE,
                                          MHD_STATICSTR_LEN_ ( \
@@ -615,7 +615,7 @@ MHD_del_response_header (struct MHD_Response *response,
                          const char *header,
                          const char *content)
 {
-  struct MHD_HTTP_Header *pos;
+  struct MHD_HTTP_Res_Header *pos;
   size_t header_len;
   size_t content_len;
 
@@ -698,7 +698,7 @@ MHD_get_response_headers (struct MHD_Response *response,
                           void *iterator_cls)
 {
   int numHeaders = 0;
-  struct MHD_HTTP_Header *pos;
+  struct MHD_HTTP_Res_Header *pos;
 
   for (pos = response->first_header;
        NULL != pos;
@@ -728,7 +728,7 @@ const char *
 MHD_get_response_header (struct MHD_Response *response,
                          const char *key)
 {
-  struct MHD_HTTP_Header *pos;
+  struct MHD_HTTP_Res_Header *pos;
   size_t key_size;
 
   if (NULL == key)
@@ -758,13 +758,13 @@ MHD_get_response_header (struct MHD_Response *response,
  * @return NULL if header element does not exist
  * @ingroup response
  */
-struct MHD_HTTP_Header *
+struct MHD_HTTP_Res_Header *
 MHD_get_response_element_n_ (struct MHD_Response *response,
                              enum MHD_ValueKind kind,
                              const char *key,
                              size_t key_len)
 {
-  struct MHD_HTTP_Header *pos;
+  struct MHD_HTTP_Res_Header *pos;
 
   mhd_assert (NULL != key);
   mhd_assert (0 != key[0]);
@@ -806,7 +806,7 @@ MHD_check_response_header_token_ci (const struct 
MHD_Response *response,
                                     const char *token,
                                     size_t token_len)
 {
-  struct MHD_HTTP_Header *pos;
+  struct MHD_HTTP_Res_Header *pos;
 
   if ( (NULL == key) ||
        ('\0' == key[0]) ||
@@ -2041,7 +2041,7 @@ MHD_create_response_for_upgrade (MHD_UpgradeHandler 
upgrade_handler,
 void
 MHD_destroy_response (struct MHD_Response *response)
 {
-  struct MHD_HTTP_Header *pos;
+  struct MHD_HTTP_Res_Header *pos;
 
   if (NULL == response)
     return;
diff --git a/src/microhttpd/response.h b/src/microhttpd/response.h
index bc650f66..4d1e84b5 100644
--- a/src/microhttpd/response.h
+++ b/src/microhttpd/response.h
@@ -67,7 +67,7 @@ MHD_response_execute_upgrade_ (struct MHD_Response *response,
  * @return NULL if header element does not exist
  * @ingroup response
  */
-struct MHD_HTTP_Header *
+struct MHD_HTTP_Res_Header *
 MHD_get_response_element_n_ (struct MHD_Response *response,
                              enum MHD_ValueKind kind,
                              const char *key,
diff --git a/src/microhttpd/test_postprocessor.c 
b/src/microhttpd/test_postprocessor.c
index 44e79c7e..c4744ec3 100644
--- a/src/microhttpd/test_postprocessor.c
+++ b/src/microhttpd/test_postprocessor.c
@@ -222,13 +222,13 @@ test_urlencoding_case (unsigned int want_start,
   for (step = 1; size >= step; ++step)
   {
     struct MHD_Connection connection;
-    struct MHD_HTTP_Header header;
+    struct MHD_HTTP_Req_Header header;
     struct MHD_PostProcessor *pp;
     unsigned int want_off = want_start;
     size_t i;
 
     memset (&connection, 0, sizeof (struct MHD_Connection));
-    memset (&header, 0, sizeof (struct MHD_HTTP_Header));
+    memset (&header, 0, sizeof (struct MHD_HTTP_Res_Header));
     connection.headers_received = &header;
     header.header = MHD_HTTP_HEADER_CONTENT_TYPE;
     header.value = MHD_HTTP_POST_ENCODING_FORM_URLENCODED;
@@ -361,7 +361,7 @@ static int
 test_multipart_garbage (void)
 {
   struct MHD_Connection connection;
-  struct MHD_HTTP_Header header;
+  struct MHD_HTTP_Req_Header header;
   struct MHD_PostProcessor *pp;
   unsigned int want_off;
   size_t size = MHD_STATICSTR_LEN_ (FORM_DATA);
@@ -378,7 +378,7 @@ test_multipart_garbage (void)
   {
     want_off = FORM_START;
     memset (&connection, 0, sizeof (struct MHD_Connection));
-    memset (&header, 0, sizeof (struct MHD_HTTP_Header));
+    memset (&header, 0, sizeof (struct MHD_HTTP_Res_Header));
     connection.headers_received = &header;
     header.header = MHD_HTTP_HEADER_CONTENT_TYPE;
     header.value =
@@ -429,7 +429,7 @@ static int
 test_multipart_splits (void)
 {
   struct MHD_Connection connection;
-  struct MHD_HTTP_Header header;
+  struct MHD_HTTP_Req_Header header;
   struct MHD_PostProcessor *pp;
   unsigned int want_off;
   size_t size;
@@ -440,7 +440,7 @@ test_multipart_splits (void)
   {
     want_off = FORM_START;
     memset (&connection, 0, sizeof (struct MHD_Connection));
-    memset (&header, 0, sizeof (struct MHD_HTTP_Header));
+    memset (&header, 0, sizeof (struct MHD_HTTP_Res_Header));
     connection.headers_received = &header;
     header.header = MHD_HTTP_HEADER_CONTENT_TYPE;
     header.value =
@@ -491,7 +491,7 @@ static int
 test_multipart (void)
 {
   struct MHD_Connection connection;
-  struct MHD_HTTP_Header header;
+  struct MHD_HTTP_Req_Header header;
   struct MHD_PostProcessor *pp;
   unsigned int want_off = FORM_START;
   size_t i;
@@ -499,7 +499,7 @@ test_multipart (void)
   size_t size;
 
   memset (&connection, 0, sizeof (struct MHD_Connection));
-  memset (&header, 0, sizeof (struct MHD_HTTP_Header));
+  memset (&header, 0, sizeof (struct MHD_HTTP_Res_Header));
   connection.headers_received = &header;
   header.header = MHD_HTTP_HEADER_CONTENT_TYPE;
   header.value =
@@ -548,7 +548,7 @@ static int
 test_nested_multipart (void)
 {
   struct MHD_Connection connection;
-  struct MHD_HTTP_Header header;
+  struct MHD_HTTP_Res_Header header;
   struct MHD_PostProcessor *pp;
   unsigned int want_off = FORM_NESTED_START;
   size_t i;
@@ -556,7 +556,7 @@ test_nested_multipart (void)
   size_t size;
 
   memset (&connection, 0, sizeof (struct MHD_Connection));
-  memset (&header, 0, sizeof (struct MHD_HTTP_Header));
+  memset (&header, 0, sizeof (struct MHD_HTTP_Res_Header));
   connection.headers_received = &header;
   header.header = MHD_HTTP_HEADER_CONTENT_TYPE;
   header.value =
@@ -623,7 +623,7 @@ static int
 test_overflow ()
 {
   struct MHD_Connection connection;
-  struct MHD_HTTP_Header header;
+  struct MHD_HTTP_Req_Header header;
   struct MHD_PostProcessor *pp;
   size_t i;
   size_t j;
@@ -631,7 +631,7 @@ test_overflow ()
   char *buf;
 
   memset (&connection, 0, sizeof (struct MHD_Connection));
-  memset (&header, 0, sizeof (struct MHD_HTTP_Header));
+  memset (&header, 0, sizeof (struct MHD_HTTP_Res_Header));
   connection.headers_received = &header;
   header.header = MHD_HTTP_HEADER_CONTENT_TYPE;
   header.value = MHD_HTTP_POST_ENCODING_FORM_URLENCODED;
@@ -686,10 +686,10 @@ test_empty_key (void)
   {
     size_t i;
     struct MHD_Connection connection;
-    struct MHD_HTTP_Header header;
+    struct MHD_HTTP_Req_Header header;
     struct MHD_PostProcessor *pp;
     memset (&connection, 0, sizeof (struct MHD_Connection));
-    memset (&header, 0, sizeof (struct MHD_HTTP_Header));
+    memset (&header, 0, sizeof (struct MHD_HTTP_Res_Header));
 
     connection.headers_received = &header;
     connection.headers_received_tail = &header;
@@ -738,12 +738,12 @@ test_double_value (void)
   {
     size_t i;
     struct MHD_Connection connection;
-    struct MHD_HTTP_Header header;
+    struct MHD_HTTP_Req_Header header;
     struct MHD_PostProcessor *pp;
     unsigned int results_off = URL_START;
     unsigned int results_final = results_off + 1; /* First value is correct */
     memset (&connection, 0, sizeof (struct MHD_Connection));
-    memset (&header, 0, sizeof (struct MHD_HTTP_Header));
+    memset (&header, 0, sizeof (struct MHD_HTTP_Res_Header));
 
     connection.headers_received = &header;
     connection.headers_received_tail = &header;
diff --git a/src/microhttpd/test_postprocessor_amp.c 
b/src/microhttpd/test_postprocessor_amp.c
index 6710bca8..0569cb1f 100644
--- a/src/microhttpd/test_postprocessor_amp.c
+++ b/src/microhttpd/test_postprocessor_amp.c
@@ -8,9 +8,9 @@
 uint64_t num_errors;
 
 enum MHD_Result
-check_post (void *cls, enum MHD_ValueKind kind, const char*key,
-            const char*filename, const char*content_type,
-            const char*content_encoding, const char*data,
+check_post (void *cls, enum MHD_ValueKind kind, const char *key,
+            const char *filename, const char *content_type,
+            const char *content_encoding, const char *data,
             uint64_t off, size_t size)
 {
   (void) cls; (void) kind; (void) filename; (void) content_type;  /* Unused. 
Silent compiler warning. */
@@ -29,7 +29,7 @@ int
 main (int argc, char *const *argv)
 {
   struct MHD_Connection connection;
-  struct MHD_HTTP_Header header;
+  struct MHD_HTTP_Req_Header header;
   struct MHD_PostProcessor *pp;
   const char *post =
     
"a=xx+xx+xxx+xxxxx+xxxx+xxxxxxxx+xxx+xxxxxx+xxx+xxx+xxxxxxx+xxxxx%0A+++++++xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx%0A+++++++--%3E%0A++++++++++++++%3Cxxxxx+xxxxx%3D%22xxx%25%22%3E%0A+++++++++++%3Cxx%3E%0A+++++++++++++++%3Cxx+xxxxxxx%3D%22x%22+xxxxx%3D%22xxxxx%22%3E%0A+++++++++++++++++++%3Cxxxxx+xxxxx%3D%22xxx%25%22%3E%0A+++++++++++++++++++++++%3Cxx%3E%0A+++++++++++++++++++++++++++%3Cxx+xxxxx%3D%22xxxx%22%3E%0A+++++++++++++++++++++++++++++++%3Cx
 [...]
@@ -37,7 +37,7 @@ main (int argc, char *const *argv)
 
   num_errors = 0;
   memset (&connection, 0, sizeof (struct MHD_Connection));
-  memset (&header, 0, sizeof (struct MHD_HTTP_Header));
+  memset (&header, 0, sizeof (struct MHD_HTTP_Res_Header));
   connection.headers_received = &header;
   header.header = MHD_HTTP_HEADER_CONTENT_TYPE;
   header.value = MHD_HTTP_POST_ENCODING_FORM_URLENCODED;
diff --git a/src/microhttpd/test_postprocessor_large.c 
b/src/microhttpd/test_postprocessor_large.c
index 4d5f1ece..7fcc5d5a 100644
--- a/src/microhttpd/test_postprocessor_large.c
+++ b/src/microhttpd/test_postprocessor_large.c
@@ -63,7 +63,7 @@ static int
 test_simple_large ()
 {
   struct MHD_Connection connection;
-  struct MHD_HTTP_Header header;
+  struct MHD_HTTP_Req_Header header;
   struct MHD_PostProcessor *pp;
   size_t i;
   size_t delta;
@@ -76,7 +76,7 @@ test_simple_large ()
   memcpy (data, "key=", 4);
   data[sizeof (data) - 1] = '\0';
   memset (&connection, 0, sizeof (struct MHD_Connection));
-  memset (&header, 0, sizeof (struct MHD_HTTP_Header));
+  memset (&header, 0, sizeof (struct MHD_HTTP_Res_Header));
   connection.headers_received = &header;
   header.header = MHD_HTTP_HEADER_CONTENT_TYPE;
   header.value = MHD_HTTP_POST_ENCODING_FORM_URLENCODED;

-- 
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]