aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/http/http1.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/http/http1.c')
-rw-r--r--src/plugins/http/http1.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/plugins/http/http1.c b/src/plugins/http/http1.c
index ec118aa4e52..265f6e7b24f 100644
--- a/src/plugins/http/http1.c
+++ b/src/plugins/http/http1.c
@@ -998,6 +998,7 @@ http1_req_state_wait_transport_method (http_conn_t *hc, http_req_t *req,
/* send at least "control data" which is necessary minimum,
* if there is some space send also portion of body */
max_enq = http_io_as_max_write (req);
+ max_enq -= sizeof (msg);
if (max_enq < req->control_data_len)
{
clib_warning ("not enough room for control data in app's rx fifo");
@@ -1859,10 +1860,12 @@ http1_transport_rx_callback (http_conn_t *hc)
if (!http1_req_state_is_rx_valid (req))
{
- clib_warning ("hc [%u]%x invalid rx state: http req state "
- "'%U', session state '%U'",
- hc->c_thread_index, hc->hc_hc_index, format_http_req_state,
- req->state, format_http_conn_state, hc);
+ if (http_io_ts_max_read (hc))
+ clib_warning ("hc [%u]%x invalid rx state: http req state "
+ "'%U', session state '%U'",
+ hc->c_thread_index, hc->hc_hc_index,
+ format_http_req_state, req->state,
+ format_http_conn_state, hc);
http_io_ts_drain_all (hc);
return;
}