From: Stephan Bosch Date: Tue, 28 Apr 2020 17:28:58 +0000 (+0200) Subject: lib-http: http-client-request - Fix return value of http_client_request_send*(). X-Git-Tag: 2.3.11.2~122 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3453455148387ae6604f84834fcc05953001e001;p=thirdparty%2Fdovecot%2Fcore.git lib-http: http-client-request - Fix return value of http_client_request_send*(). 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. --- diff --git a/src/lib-http/http-client-request.c b/src/lib-http/http-client-request.c index 8a0cc3c662..b8222b5a21 100644 --- a/src/lib-http/http-client-request.c +++ b/src/lib-http/http-client-request.c @@ -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;