From 404b2b78f187e3da2fedee5748b9bfcdfa4a105c Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 6 May 2023 20:55:40 +0200 Subject: add convenience function TALER_TEMPLATING_reply_error --- src/mhd/mhd_parsing.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/mhd/mhd_parsing.c') diff --git a/src/mhd/mhd_parsing.c b/src/mhd/mhd_parsing.c index b047df7d3..9e3cb5714 100644 --- a/src/mhd/mhd_parsing.c +++ b/src/mhd/mhd_parsing.c @@ -364,7 +364,16 @@ TALER_MHD_check_content_length_ (struct MHD_Connection *connection, MHD_HEADER_KIND, MHD_HTTP_HEADER_CONTENT_LENGTH); if (NULL == cl) - return GNUNET_OK; + { + GNUNET_break_op (0); + return (MHD_YES == + TALER_MHD_reply_with_error (connection, + MHD_HTTP_BAD_REQUEST, + TALER_EC_GENERIC_PARAMETER_MISSING, + MHD_HTTP_HEADER_CONTENT_LENGTH)) + ? GNUNET_NO + : GNUNET_SYSERR; + } if (1 != sscanf (cl, "%llu%c", &cv, -- cgit v1.2.3