commit 2d4212f2574e810eb14073581c17418540e79ea9 parent e91e6d3a372d918ca9b611221471cf6b5e37989b Author: Christian Grothoff <christian@grothoff.org> Date: Mon, 16 May 2011 11:24:47 +0000 fixthefix Diffstat:
| M | src/daemon/connection.c | | | 7 | ++++++- |
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/daemon/connection.c b/src/daemon/connection.c @@ -1365,12 +1365,17 @@ process_request_body (struct MHD_Connection *connection) { /* no chunked encoding, give all to the client */ if ( (0 != connection->remaining_upload_size) && - (MHD_SIZE_UNKNOWN != connection->remaining_upload_size) ) + (MHD_SIZE_UNKNOWN != connection->remaining_upload_size) && + (connection->remaining_upload_size < available) ) { processed = connection->remaining_upload_size; } else { + /** + * 1. no chunked encoding, give all to the client + * 2. client may send large chunked data, but only a smaller part is available at one time. + */ processed = available; } }