aboutsummaryrefslogtreecommitdiff
path: root/src/mhd
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2023-05-06 20:55:40 +0200
committerChristian Grothoff <christian@grothoff.org>2023-05-06 20:55:40 +0200
commit404b2b78f187e3da2fedee5748b9bfcdfa4a105c (patch)
treef774b8ca0ea11d8886c7ff02f024c9588bbeef74 /src/mhd
parent1f9427e1d9672b93577aea4c9d5a63575ee0b525 (diff)
add convenience function TALER_TEMPLATING_reply_error
Diffstat (limited to 'src/mhd')
-rw-r--r--src/mhd/mhd_parsing.c11
1 files changed, 10 insertions, 1 deletions
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,