diff options
Diffstat (limited to 'src/microhttpd/connection.c')
-rw-r--r-- | src/microhttpd/connection.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c index c23e9e5c..33d54234 100644 --- a/src/microhttpd/connection.c +++ b/src/microhttpd/connection.c | |||
@@ -1135,7 +1135,7 @@ try_ready_chunked_body (struct MHD_Connection *connection, | |||
1135 | _ ("Closing connection (out of memory).")); | 1135 | _ ("Closing connection (out of memory).")); |
1136 | return MHD_NO; | 1136 | return MHD_NO; |
1137 | } | 1137 | } |
1138 | /* Limit the buffer size to the large usable size for chunks */ | 1138 | /* Limit the buffer size to the largest usable size for chunks */ |
1139 | if ( (max_chunk + max_chunk_overhead) < size) | 1139 | if ( (max_chunk + max_chunk_overhead) < size) |
1140 | size = max_chunk + max_chunk_overhead; | 1140 | size = max_chunk + max_chunk_overhead; |
1141 | connection->write_buffer = MHD_pool_reallocate (connection->pool, | 1141 | connection->write_buffer = MHD_pool_reallocate (connection->pool, |
@@ -1183,6 +1183,9 @@ try_ready_chunked_body (struct MHD_Connection *connection, | |||
1183 | { | 1183 | { |
1184 | if (NULL == response->crc) | 1184 | if (NULL == response->crc) |
1185 | { /* There is no way to reach this code */ | 1185 | { /* There is no way to reach this code */ |
1186 | #if defined(MHD_USE_THREADS) | ||
1187 | MHD_mutex_unlock_chk_ (&response->mutex); | ||
1188 | #endif | ||
1186 | CONNECTION_CLOSE_ERROR (connection, | 1189 | CONNECTION_CLOSE_ERROR (connection, |
1187 | _ ("No callback for the chunked data.")); | 1190 | _ ("No callback for the chunked data.")); |
1188 | return MHD_NO; | 1191 | return MHD_NO; |
@@ -1222,6 +1225,9 @@ try_ready_chunked_body (struct MHD_Connection *connection, | |||
1222 | } | 1225 | } |
1223 | if (size_to_fill < (size_t) ret) | 1226 | if (size_to_fill < (size_t) ret) |
1224 | { | 1227 | { |
1228 | #if defined(MHD_USE_THREADS) | ||
1229 | MHD_mutex_unlock_chk_ (&response->mutex); | ||
1230 | #endif | ||
1225 | CONNECTION_CLOSE_ERROR (connection, | 1231 | CONNECTION_CLOSE_ERROR (connection, |
1226 | _ ("Closing connection (application returned " \ | 1232 | _ ("Closing connection (application returned " \ |
1227 | "more data than requested).")); | 1233 | "more data than requested).")); |