From 4fb57ae153ddd856c80885425eb2321cd95a2cf0 Mon Sep 17 00:00:00 2001 From: "Evgeny Grin (Karlson2k)" Date: Sat, 21 Aug 2021 16:39:35 +0300 Subject: Added new connection flag "stop_with_error". Stopped usage of "read_close" flag when read hasn't been closed. --- src/microhttpd/internal.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/microhttpd/internal.h') diff --git a/src/microhttpd/internal.h b/src/microhttpd/internal.h index 60d1862d..a2a454f1 100644 --- a/src/microhttpd/internal.h +++ b/src/microhttpd/internal.h @@ -1186,6 +1186,18 @@ struct MHD_Connection */ bool read_closed; + /** + * Some error happens during processing the connection therefore this + * connection must be closed. + * The error may come from the client side (like wrong request format), + * from the application side (like data callback returned error), or from + * the OS side (like out-of-memory). + * The connection cannot be reused for additional requests as the current + * request may be incompletely read and it is unclear where is the initial + * byte of the next request. + */ + bool stop_with_error; + #if defined(MHD_USE_POSIX_THREADS) || defined(MHD_USE_W32_THREADS) /** * Set to `true` if the thread has been joined. -- cgit v1.2.3