]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-http: http-client-request - Fix return value of http_client_request_send*().
authorStephan Bosch <stephan.bosch@open-xchange.com>
Tue, 28 Apr 2020 17:28:58 +0000 (19:28 +0200)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Tue, 5 May 2020 06:17:30 +0000 (06:17 +0000)
Make sure 1 is returned when all that can be sent is sent. It must not return 0
when the payload input stream is blocking.

src/lib-http/http-client-request.c

index 8a0cc3c662f91aee13b6e4ba42367b6351065350..b8222b5a217cf2f455b11a7c9aa1df493031d93f 100644 (file)
@@ -1285,7 +1285,7 @@ int http_client_request_send_more(struct http_client_request *req,
                conn->io_req_payload = io_add_istream_to(
                        cctx->ioloop, req->payload_input,
                        http_client_request_payload_input, req);
-               return 0;
+               return 1;
        case OSTREAM_SEND_ISTREAM_RESULT_WAIT_OUTPUT:
                /* output is blocking (server needs to act; enable timeout) */
                conn->output_locked = TRUE;