aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorMatus Fabian <matfabia@cisco.com>2024-05-07 13:52:16 +0200
committerFlorin Coras <florin.coras@gmail.com>2024-05-07 17:06:51 +0000
commitdba5c4194292b67f6825ef3eee0640b9970b026b (patch)
tree8e4053e40ddcf178a2d98b36796e0c1d11759afd /src/plugins
parentb8c762cc22687c3e4ca89f7f2f95b43451e3c9b7 (diff)
http: fix client send another request
HTTP client should be able to send another request after large data receiving. Type: fix Change-Id: I8352ea760a4b3de4b79159531c7e4c1fa4e03203 Signed-off-by: Matus Fabian <matfabia@cisco.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/http/http.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/plugins/http/http.c b/src/plugins/http/http.c
index 737e7b034a9..855ab8deb3b 100644
--- a/src/plugins/http/http.c
+++ b/src/plugins/http/http.c
@@ -898,6 +898,13 @@ http_state_client_io_more_data (http_conn_t *hc, transport_send_params_t *sp)
hc->to_recv -= rv;
HTTP_DBG (1, "drained %d from ts; remains %d", rv, hc->to_recv);
+ if (hc->to_recv == 0)
+ {
+ hc->rx_buf_offset = 0;
+ vec_reset_length (hc->rx_buf);
+ http_state_change (hc, HTTP_STATE_WAIT_APP_METHOD);
+ }
+
app_wrk = app_worker_get_if_valid (as->app_wrk_index);
if (app_wrk)
app_worker_rx_notify (app_wrk, as);