diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2019-06-16 23:17:20 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2019-06-17 15:01:46 +0300 |
commit | 1f9e183d103d6f2ac100763c0280db3dc26adbec (patch) | |
tree | 46659007fc72bfa8968b45a293f106983aa0da2b | |
parent | 20767d5dec4abe6078ed73365cb566fe985a8319 (diff) | |
download | libmicrohttpd-1f9e183d103d6f2ac100763c0280db3dc26adbec.tar.gz libmicrohttpd-1f9e183d103d6f2ac100763c0280db3dc26adbec.zip |
process_request_body(): do not move data if nothing was processed
-rw-r--r-- | src/microhttpd/connection.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c index 9b8d3e2b..525e6a8c 100644 --- a/src/microhttpd/connection.c +++ b/src/microhttpd/connection.c | |||
@@ -2804,7 +2804,8 @@ process_request_body (struct MHD_Connection *connection) | |||
2804 | connection->remaining_upload_size -= processed_size; | 2804 | connection->remaining_upload_size -= processed_size; |
2805 | } | 2805 | } |
2806 | while (MHD_YES == instant_retry); | 2806 | while (MHD_YES == instant_retry); |
2807 | if (available > 0) | 2807 | if ( (available > 0) && |
2808 | (buffer_head != connection->read_buffer) ) | ||
2808 | memmove (connection->read_buffer, | 2809 | memmove (connection->read_buffer, |
2809 | buffer_head, | 2810 | buffer_head, |
2810 | available); | 2811 | available); |