aboutsummaryrefslogtreecommitdiff
path: root/doc/examples/largepost.c
diff options
context:
space:
mode:
Diffstat (limited to 'doc/examples/largepost.c')
-rw-r--r--doc/examples/largepost.c13
1 files changed, 10 insertions, 3 deletions
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 =
65 "<html><body>An internal server error has occured.</body></html>"; 65 "<html><body>An internal server error has occured.</body></html>";
66const char *fileexistspage = 66const char *fileexistspage =
67 "<html><body>This file already exists.</body></html>"; 67 "<html><body>This file already exists.</body></html>";
68const char const *postprocerror =
69 "<html><head><title>Error</title></head><body>Error processing POST data</body></html>";
68 70
69 71
70static int 72static int
@@ -241,9 +243,14 @@ answer_to_connection (void *cls,
241 243
242 if (0 != *upload_data_size) 244 if (0 != *upload_data_size)
243 { 245 {
244 MHD_post_process (con_info->postprocessor, 246 if (MHD_post_process (con_info->postprocessor,
245 upload_data, 247 upload_data,
246 *upload_data_size); 248 *upload_data_size) != MHD_YES)
249 {
250 return send_page (connection,
251 postprocerror,
252 MHD_HTTP_BAD_REQUEST);
253 }
247 *upload_data_size = 0; 254 *upload_data_size = 0;
248 255
249 return MHD_YES; 256 return MHD_YES;