[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libmicrohttpd] 02/08: Chunked response: close connection if application
From: |
gnunet |
Subject: |
[libmicrohttpd] 02/08: Chunked response: close connection if application returns more data than requested |
Date: |
Mon, 25 Oct 2021 15:58:52 +0200 |
This is an automated email from the git hooks/post-receive script.
karlson2k pushed a commit to branch master
in repository libmicrohttpd.
commit a2798b7c7d4707effefc0ac95562670b0161c8d0
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Mon Oct 25 14:52:39 2021 +0300
Chunked response: close connection if application returns more data than
requested
---
src/microhttpd/connection.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index 9f550221..b652005c 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -1220,6 +1220,13 @@ try_ready_chunked_body (struct MHD_Connection
*connection,
#endif
return MHD_NO;
}
+ if (size_to_fill < (size_t) ret)
+ {
+ CONNECTION_CLOSE_ERROR (connection,
+ _ ("Closing connection (application returned " \
+ "more data than requested)."));
+ return MHD_NO;
+ }
chunk_hdr_len = MHD_uint32_to_strx (ret, chunk_hdr, sizeof(chunk_hdr));
mhd_assert (chunk_hdr_len != 0);
mhd_assert (chunk_hdr_len < sizeof(chunk_hdr));
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [libmicrohttpd] branch master updated (9cb16af3 -> b6a6f46c), gnunet, 2021/10/25
- [libmicrohttpd] 04/08: connection.c: fixed compiler warning, gnunet, 2021/10/25
- [libmicrohttpd] 02/08: Chunked response: close connection if application returns more data than requested,
gnunet <=
- [libmicrohttpd] 01/08: mhd_str: fixed typos in doxy comments, gnunet, 2021/10/25
- [libmicrohttpd] 06/08: mhd_mono_clock: do not use MinGW clock wrappers on W32, gnunet, 2021/10/25
- [libmicrohttpd] 08/08: Fixed builds with MSVS, gnunet, 2021/10/25
- [libmicrohttpd] 03/08: Removed unneeded cast of MHD_CONTENT_READER_END_* values, gnunet, 2021/10/25
- [libmicrohttpd] 05/08: configure: removed unused HAVE_DECL_SOCK_NONBLOCK macro from MHD_config.h, gnunet, 2021/10/25
- [libmicrohttpd] 07/08: tsearch.c: fixed missing include after f66a23d27116ade5876d7e23d8c077091cd572e9, gnunet, 2021/10/25