aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/connection.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-07-16 19:56:26 +0000
committerChristian Grothoff <christian@grothoff.org>2016-07-16 19:56:26 +0000
commitdcc7066746037f61e9645b70d6526a44efdba093 (patch)
treec3ab2d3e0ccf14322a3a27c2a50a2cb80f9659f1 /src/microhttpd/connection.c
parent535985fe1c4cd920c2d042fa810753a6b0b9ceb8 (diff)
downloadlibmicrohttpd-dcc7066746037f61e9645b70d6526a44efdba093.tar.gz
libmicrohttpd-dcc7066746037f61e9645b70d6526a44efdba093.zip
print warning if application code performing connection POST processing is buggy
Diffstat (limited to 'src/microhttpd/connection.c')
-rw-r--r--src/microhttpd/connection.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index a94a1ca6..5871df4a 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -1794,7 +1794,19 @@ process_request_body (struct MHD_Connection *connection)
1794#endif 1794#endif
1795 ); 1795 );
1796 if (0 != processed) 1796 if (0 != processed)
1797 instant_retry = MHD_NO; /* client did not process everything */ 1797 {
1798 instant_retry = MHD_NO; /* client did not process everything */
1799#ifdef HAVE_MESSAGES
1800 /* client did not process all POST data, complain if
1801 the setup was incorrect, which may prevent us from
1802 handling the rest of the request */
1803 if ( ( (0 != (connection->daemon->options & MHD_USE_THREAD_PER_CONNECTION)) ||
1804 (0 != (connection->daemon->options & MHD_USE_SELECT_INTERNALLY)) ) &&
1805 (MHD_NO == connection->suspended) )
1806 MHD_DLOG (connection->daemon,
1807 "WARNING: incomplete POST processing and connection not suspended will result in hung connection.\n");
1808 }
1809#endif
1798 used -= processed; 1810 used -= processed;
1799 if (connection->have_chunked_upload == MHD_YES) 1811 if (connection->have_chunked_upload == MHD_YES)
1800 connection->current_chunk_offset += used; 1812 connection->current_chunk_offset += used;