http_client: do not fail if the read buffer is full
@@ -605,7 +605,11 @@ int flb_http_do(struct flb_http_client *c, size_t *bytes)
while (1) {
available = ((sizeof(c->resp.data) - 1) - c->resp.data_len);
if (available < 1) {
- return -1;
+ /*
+ * If there is no more space available on our buffer,
+ * just return zero and let the caller do it own validations.
+ */
+ return 0;
}
r_bytes = flb_io_net_read(c->u_conn,
