commit 6e4f2b8aab871ccb5ceb21228f959164d38fa4eb
parent 4f2583e9ab918cf5e760f461c22e516d7d0a16be
Author: Christian Grothoff <grothoff@gnunet.org>
Date: Thu, 16 Jul 2026 01:25:22 +0200
properly re-add support for JSON uploads
Diffstat:
1 file changed, 14 insertions(+), 11 deletions(-)
diff --git a/src/challenger/challenger-httpd_challenge.c b/src/challenger/challenger-httpd_challenge.c
@@ -671,18 +671,21 @@ CH_handler_challenge (struct CH_HandlerContext *hc,
"Processing /challenge upload with %s encoding...\n",
ct);
}
- bc->pp = MHD_create_post_processor (hc->connection,
- 1024,
- &post_iter,
- bc);
- if (NULL == bc->pp)
+ if (! bc->is_json)
{
- GNUNET_break_op (0);
- return TALER_MHD_reply_with_error (
- hc->connection,
- MHD_HTTP_BAD_REQUEST,
- TALER_EC_GENERIC_PARAMETER_MALFORMED,
- "Content-Type");
+ bc->pp = MHD_create_post_processor (hc->connection,
+ 1024,
+ &post_iter,
+ bc);
+ if (NULL == bc->pp)
+ {
+ GNUNET_break_op (0);
+ return TALER_MHD_reply_with_error (
+ hc->connection,
+ MHD_HTTP_BAD_REQUEST,
+ TALER_EC_GENERIC_PARAMETER_MALFORMED,
+ "Content-Type");
+ }
}
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Awaiting /challenge upload (%u)...\n",