diff --git a/doc/examples/largepost.c b/doc/examples/largepost.c
index 04c7df37..01d005ab 100644
--- a/doc/examples/largepost.c
+++ b/doc/examples/largepost.c
@@ -65,6 +65,8 @@ const char *servererrorpage =
"
An internal server error has occured.";
const char *fileexistspage =
"This file already exists.";
+const char const *postprocerror =
+ "ErrorError processing POST data";
static int
@@ -241,9 +243,14 @@ answer_to_connection (void *cls,
if (0 != *upload_data_size)
{
- MHD_post_process (con_info->postprocessor,
- upload_data,
- *upload_data_size);
+ if (MHD_post_process (con_info->postprocessor,
+ upload_data,
+ *upload_data_size) != MHD_YES)
+ {
+ return send_page (connection,
+ postprocerror,
+ MHD_HTTP_BAD_REQUEST);
+ }
*upload_data_size = 0;
return MHD_YES;