aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/http/http.c
diff options
context:
space:
mode:
authorMatus Fabian <matfabia@cisco.com>2024-05-10 16:20:40 +0200
committerFlorin Coras <florin.coras@gmail.com>2024-05-14 22:36:31 +0000
commitb7a9ed75fbce1e5e69441916a14235b3a1403593 (patch)
treecae379207e9315484245f869332adc8d2bc60a82 /src/plugins/http/http.c
parent182d8b2ddba098f99029ed82e44960f3dfd18987 (diff)
http: fix server sending all status codes
Type: fix Change-Id: I4bc748e3091c2fbe0142d1b74d21a543a62c4ce0 Signed-off-by: Matus Fabian <matfabia@cisco.com>
Diffstat (limited to 'src/plugins/http/http.c')
-rw-r--r--src/plugins/http/http.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/plugins/http/http.c b/src/plugins/http/http.c
index 526e665903a..59cb094eabe 100644
--- a/src/plugins/http/http.c
+++ b/src/plugins/http/http.c
@@ -740,6 +740,10 @@ http_state_wait_app_reply (http_conn_t *hc, transport_send_params_t *sp)
switch (msg.code)
{
+ case HTTP_STATUS_NOT_FOUND:
+ case HTTP_STATUS_METHOD_NOT_ALLOWED:
+ case HTTP_STATUS_BAD_REQUEST:
+ case HTTP_STATUS_INTERNAL_ERROR:
case HTTP_STATUS_OK:
header =
format (0, http_response_template, http_status_code_str[msg.code],
@@ -760,6 +764,7 @@ http_state_wait_app_reply (http_conn_t *hc, transport_send_params_t *sp)
/* Location: http(s)://new-place already queued up as data */
break;
default:
+ clib_warning ("unsupported status code: %d", msg.code);
return HTTP_SM_ERROR;
}