From: Stephan Bosch Date: Wed, 29 Apr 2020 20:23:44 +0000 (+0200) Subject: lib-http: http-server-ostream - Remove dangerous assertions in http_server_ostream_wa... X-Git-Tag: 2.3.11.2~118 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9bd41c974deb21562c4d4a728c4a64acece21f5c;p=thirdparty%2Fdovecot%2Fcore.git lib-http: http-server-ostream - Remove dangerous assertions in http_server_ostream_wait_begin(). --- diff --git a/src/lib-http/http-server-ostream.c b/src/lib-http/http-server-ostream.c index ec5efd50d8..566aa701ef 100644 --- a/src/lib-http/http-server-ostream.c +++ b/src/lib-http/http-server-ostream.c @@ -195,17 +195,14 @@ http_server_ostream_wait_begin(struct wrapper_ostream *wostream, even though it is read to the end. This could lead to problems, so we make an effort to destroy it here. */ - if (conn->incoming_payload != NULL) { + if (conn->incoming_payload != NULL && + i_stream_read_eof(conn->incoming_payload)) { struct http_server_request *req = hsostream->resp->request; struct istream *payload; - if (!i_stream_read_eof(conn->incoming_payload)) - i_unreached(); payload = req->req.payload; req->req.payload = NULL; i_stream_unref(&payload); - - i_assert(conn->incoming_payload == NULL); } prev_ioloop = http_server_connection_switch_ioloop_to(conn, ioloop);