]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-http: http-server-ostream - Remove dangerous assertions in http_server_ostream_wa...
authorStephan Bosch <stephan.bosch@open-xchange.com>
Wed, 29 Apr 2020 20:23:44 +0000 (22:23 +0200)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Tue, 5 May 2020 06:17:30 +0000 (06:17 +0000)
src/lib-http/http-server-ostream.c

index ec5efd50d8840d6804fdfec2310d3b38e230e1a3..566aa701ef3a6b7cb70d6548e8352050db46ddf1 100644 (file)
@@ -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);