summaryrefslogtreecommitdiffstats
path: root/src/plugins/http/http.c
diff options
context:
space:
mode:
authorMatus Fabian <matfabia@cisco.com>2024-05-14 10:04:35 +0200
committerFlorin Coras <florin.coras@gmail.com>2024-05-14 22:39:38 +0000
commitfec709125b68064b61f75f91449e60b80f0f68ca (patch)
tree36aa888bb8a3b1866f593fcaf37f0235091df888 /src/plugins/http/http.c
parent3d00893c37a725da6ead642a8d8852e9f5c13628 (diff)
http: fix unsupported client app method
HTTP client app code currently support only GET method but method set in message from client app was silently ignored. Type: fix Change-Id: I99dc6323d9783ee5a20623e7923cfdbf31474a4f Signed-off-by: Matus Fabian <matfabia@cisco.com>
Diffstat (limited to 'src/plugins/http/http.c')
-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 797be1b7a16..893dd877c29 100644
--- a/src/plugins/http/http.c
+++ b/src/plugins/http/http.c
@@ -824,6 +824,13 @@ http_state_wait_app_method (http_conn_t *hc, transport_send_params_t *sp)
goto error;
}
+ /* currently we support only GET method */
+ if (msg.method_type != HTTP_REQ_GET)
+ {
+ clib_warning ("unsupported method %d", msg.method_type);
+ goto error;
+ }
+
vec_validate (buf, msg.data.len - 1);
rv = svm_fifo_dequeue (as->tx_fifo, msg.data.len, buf);
ASSERT (rv == msg.data.len);