gnunet-svn
[Top][All Lists]
Advanced

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

[libmicrohttpd] branch master updated (7999c2d7 -> 475cfd18)


From: gnunet
Subject: [libmicrohttpd] branch master updated (7999c2d7 -> 475cfd18)
Date: Tue, 09 Nov 2021 18:57:33 +0100

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

karlson2k pushed a change to branch master
in repository libmicrohttpd.

    from 7999c2d7 test_{tricky,toolarge}: fixed code style
     new 0ae9a4c1 test_{tricky,toolarge}: minor improvement
     new 475cfd18 Updated doxy for MHD_AccessHandlerCallback

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     | 15 +++++++++++----
 src/testcurl/test_toolarge.c |  6 +++---
 src/testcurl/test_tricky.c   |  6 +++---
 3 files changed, 17 insertions(+), 10 deletions(-)

diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h
index 3f285eb5..43910bc1 100644
--- a/src/include/microhttpd.h
+++ b/src/include/microhttpd.h
@@ -2354,23 +2354,30 @@ typedef enum MHD_Result
  * #MHD_HTTP_METHOD_POST, etc).
  *
  * The callback must call MHD function MHD_queue_response() to provide content
- * to give back to the client and return an HTTP status code
- * (i.e. #MHD_HTTP_OK, #MHD_HTTP_NOT_FOUND, etc.). The response can be created
+ * to give back to the client and return an HTTP status code (i.e.
+ * #MHD_HTTP_OK, #MHD_HTTP_NOT_FOUND, etc.). The response can be created
  * in this callback or prepared in advance.
- * As soon as response is provided this callback will not be called anymore
- * for the current request.
  * Alternatively, callback may call MHD_suspend_connection() to temporarily
  * suspend data processing for this connection.
+ *
+ * As soon as response is provided this callback will not be called anymore
+ * for the current request.
+ *
  * For each HTTP request this callback is called several times:
  * * after request headers are fully received and decoded,
  * * for each received part of request body (optional, if request has body),
  * * when request is fully received.
+ *
  * If response is provided before request is fully received, the rest
  * of the request is discarded and connection is automatically closed
  * after sending response.
+ *
  * If the request is fully received, but response hasn't been provided and
  * connection is not suspended, the callback can be called again immediately.
  *
+ * The response cannot be queued when this callback is called to process
+ * the client upload data (when @a upload_data is not NULL).
+ *
  * @param cls argument given together with the function
  *        pointer when the handler was registered with MHD
  * @param url the requested url
diff --git a/src/testcurl/test_toolarge.c b/src/testcurl/test_toolarge.c
index 2cb1f48e..3078689b 100644
--- a/src/testcurl/test_toolarge.c
+++ b/src/testcurl/test_toolarge.c
@@ -455,6 +455,9 @@ ahcCheck (void *cls,
   struct ahc_cls_type *const param = (struct ahc_cls_type *) cls;
   size_t i;
 
+  if (NULL == param)
+    mhdErrorExitDesc ("cls parameter is NULL");
+
   if (0 != strcmp (version, MHD_HTTP_VERSION_1_1))
     mhdErrorExitDesc ("Unexpected HTTP version");
 
@@ -470,9 +473,6 @@ ahcCheck (void *cls,
   if (0 != *upload_data_size)
     mhdErrorExitDesc ("'*upload_data_size' value is not zero");
 
-  if (NULL == param)
-    mhdErrorExitDesc ("cls parameter is NULL");
-
   if (0 != strcmp (param->rq_method, method))
     mhdErrorExitDesc ("Unexpected request method");
 
diff --git a/src/testcurl/test_tricky.c b/src/testcurl/test_tricky.c
index c0233bda..8538fb28 100644
--- a/src/testcurl/test_tricky.c
+++ b/src/testcurl/test_tricky.c
@@ -383,6 +383,9 @@ ahcCheck (void *cls,
   enum MHD_Result ret;
   struct ahc_cls_type *const param = (struct ahc_cls_type *) cls;
 
+  if (NULL == param)
+    mhdErrorExitDesc ("cls parameter is NULL");
+
   if (0 != strcmp (version, MHD_HTTP_VERSION_1_1))
     mhdErrorExitDesc ("Unexpected HTTP version");
 
@@ -398,9 +401,6 @@ ahcCheck (void *cls,
   if (0 != *upload_data_size)
     mhdErrorExitDesc ("'*upload_data_size' value is not zero");
 
-  if (NULL == param)
-    mhdErrorExitDesc ("cls parameter is NULL");
-
   if (0 != strcmp (param->rq_method, method))
     mhdErrorExitDesc ("Unexpected request method");
 

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