From 3453455148387ae6604f84834fcc05953001e001 Mon Sep 17 00:00:00 2001 From: Stephan Bosch Date: Tue, 28 Apr 2020 19:28:58 +0200 Subject: [PATCH] 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. --- src/lib-http/http-client-request.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.47.3