summaryrefslogtreecommitdiffstats
path: root/src/plugins/http/http.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2022-02-11 11:59:04 -0800
committerFlorin Coras <florin.coras@gmail.com>2022-02-11 19:55:17 +0000
commit360aee3e00c1211840b5a946a274ef1c496d5aa2 (patch)
tree42d8d7bedb5de3ce76f807fecf44ee742f16e731 /src/plugins/http/http.c
parentd37328eb8b255135c9e0599650d994949e61cd27 (diff)
http: fix support for files larger than u32
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Iad7304c3a8fef14ec85c4240714feb86637411ca
Diffstat (limited to 'src/plugins/http/http.c')
-rw-r--r--src/plugins/http/http.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/http/http.c b/src/plugins/http/http.c
index 4ac136b7b0d..d407d9dfdb0 100644
--- a/src/plugins/http/http.c
+++ b/src/plugins/http/http.c
@@ -192,6 +192,7 @@ http_ts_accept_callback (session_t *ts)
* the fifo is small (under 16K) we set the threshold to it's size, meaning
* a notification will be given when the fifo empties.
*/
+ ts = session_get_from_handle (hc->h_tc_session_handle);
thresh = clib_min (svm_fifo_size (ts->tx_fifo), HTTP_FIFO_THRESH);
svm_fifo_set_deq_thresh (ts->tx_fifo, thresh);
@@ -254,7 +255,7 @@ static const char *http_response_template = "HTTP/1.1 200 OK\r\n"
"Expires: %U GMT\r\n"
"Server: VPP Static\r\n"
"Content-Type: %s\r\n"
- "Content-Length: %d\r\n\r\n";
+ "Content-Length: %lu\r\n\r\n";
static u32
send_data (http_conn_t *hc, u8 *data, u32 length, u32 offset)