diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2021-09-29 17:31:29 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2021-09-29 20:44:24 +0300 |
commit | ccd75de5b8513c5d78d5304ccc318b32b25a1844 (patch) | |
tree | ecdc90210000a2b224eee3e03251942b1b771355 /src | |
parent | cb5332ab4328374822f3051e6effbfac1f03b815 (diff) | |
download | libmicrohttpd-ccd75de5b8513c5d78d5304ccc318b32b25a1844.tar.gz libmicrohttpd-ccd75de5b8513c5d78d5304ccc318b32b25a1844.zip |
connection_reset(): notify app with correct code
Diffstat (limited to 'src')
-rw-r--r-- | src/microhttpd/connection.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c index a2049527..941b21a3 100644 --- a/src/microhttpd/connection.c +++ b/src/microhttpd/connection.c | |||
@@ -4078,6 +4078,8 @@ connection_reset (struct MHD_Connection *connection, | |||
4078 | /* Next function will destroy response, notify client, | 4078 | /* Next function will destroy response, notify client, |
4079 | * destroy memory pool, and set connection state to "CLOSED" */ | 4079 | * destroy memory pool, and set connection state to "CLOSED" */ |
4080 | MHD_connection_close_ (connection, | 4080 | MHD_connection_close_ (connection, |
4081 | c->stop_with_error ? | ||
4082 | MHD_REQUEST_TERMINATED_WITH_ERROR : | ||
4081 | MHD_REQUEST_TERMINATED_COMPLETED_OK); | 4083 | MHD_REQUEST_TERMINATED_COMPLETED_OK); |
4082 | c->read_buffer = NULL; | 4084 | c->read_buffer = NULL; |
4083 | c->read_buffer_size = 0; | 4085 | c->read_buffer_size = 0; |
@@ -4091,6 +4093,7 @@ connection_reset (struct MHD_Connection *connection, | |||
4091 | { | 4093 | { |
4092 | /* Reset connection to process the next request */ | 4094 | /* Reset connection to process the next request */ |
4093 | size_t new_read_buf_size; | 4095 | size_t new_read_buf_size; |
4096 | mhd_assert (! c->stop_with_error); | ||
4094 | 4097 | ||
4095 | if ( (NULL != d->notify_completed) && | 4098 | if ( (NULL != d->notify_completed) && |
4096 | (c->client_aware) ) | 4099 | (c->client_aware) ) |