summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSemir Sionek <ssionek@cisco.com>2025-01-14 06:39:15 -0500
committerSemir Sionek <ssionek@cisco.com>2025-01-14 06:39:15 -0500
commit5a4c869742d9dac35e285a53c80aa151b8857dde (patch)
treec0237210b81bc3d4b2d7400d90183672b4009120
parentd79ef56396fe2564ac5ce06de28647f1cb3597cc (diff)
http_static: read body only for POST requests
Type: improvement Change-Id: Id863f59d04d8e6f22c886e079367d06908b8b24b Signed-off-by: Semir Sionek <ssionek@cisco.com>
-rw-r--r--src/plugins/http_static/static_server.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/http_static/static_server.c b/src/plugins/http_static/static_server.c
index ae42fd53762..7afac4229c3 100644
--- a/src/plugins/http_static/static_server.c
+++ b/src/plugins/http_static/static_server.c
@@ -582,8 +582,8 @@ hss_ts_rx_callback (session_t *ts)
}
}
- /* Read body */
- if (msg.data.body_len)
+ /* Read request body for POST requests */
+ if (msg.data.body_len && msg.method_type == HTTP_REQ_POST)
{
vec_validate (data, msg.data.body_len - 1);
rv = svm_fifo_peek (ts->rx_fifo, msg.data.body_offset, msg.data.body_len,