commit 9a96cbfccca315c07140654fbaad0c2385ea3f9c
parent 63d1cb41578a62e4d9b457eb09b7248d3a703d2b
Author: Christian Grothoff <christian@grothoff.org>
Date: Mon, 6 Oct 2025 20:33:35 +0200
-fix warning
Diffstat:
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/src/donau/donau-httpd.c b/src/donau/donau-httpd.c
@@ -74,7 +74,7 @@
* Above what request latency do we start to log?
*/
#define WARN_LATENCY GNUNET_TIME_relative_multiply ( \
- GNUNET_TIME_UNIT_MILLISECONDS, 500)
+ GNUNET_TIME_UNIT_MILLISECONDS, 500)
/**
* Are clients allowed to request /keys for times other than the
@@ -276,6 +276,10 @@ proceed_with_handler (struct DH_RequestContext *rc,
const char *args[rh->nargs + 2];
size_t ulen = strlen (url) + 1;
json_t *root = NULL;
+ const bool is_post = (0 == strcasecmp (rh->method,
+ MHD_HTTP_METHOD_POST));
+ const bool is_patch = (0 == strcasecmp (rh->method,
+ MHD_HTTP_METHOD_PATCH));
MHD_RESULT ret;
if ( (rh->needs_authorization) &&
@@ -318,11 +322,6 @@ proceed_with_handler (struct DH_RequestContext *rc,
/* All POST and PATCH endpoints come with a body in JSON format. So we parse
the JSON here. */
- const bool is_post = (0 == strcasecmp (rh->method,
- MHD_HTTP_METHOD_POST));
- const bool is_patch = (0 == strcasecmp (rh->method,
- MHD_HTTP_METHOD_PATCH));
-
if (is_post || is_patch)
{
enum GNUNET_GenericReturnValue res;