From 9929561a5d7388e655eadfaf458d27b96f00abd5 Mon Sep 17 00:00:00 2001 From: Dave Barach Date: Thu, 17 Oct 2019 15:53:08 -0400 Subject: http_static: pass http request type to builtin handlers Makes it easy to tell GETs from POSTs, etc., in case one wants to register the same handler for multiple request types. Return interface stats as a json array, makes .js code a lot simpler. Type: refactor Signed-off-by: Dave Barach Change-Id: Iadae7b909cf3e8ea179fe93620737fdf68f888ac --- src/plugins/http_static/static_server.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/plugins/http_static') diff --git a/src/plugins/http_static/static_server.c b/src/plugins/http_static/static_server.c index 16136d2d4ed..5dfa347dc03 100644 --- a/src/plugins/http_static/static_server.c +++ b/src/plugins/http_static/static_server.c @@ -676,10 +676,10 @@ find_end: if (p) { int rv; - int (*fp) (u8 *, http_session_t *); + int (*fp) (http_builtin_method_type_t, u8 *, http_session_t *); fp = (void *) p[0]; hs->path = path; - rv = (*fp) (request, hs); + rv = (*fp) (request_type, request, hs); if (rv) { clib_warning ("builtin handler %llx hit on %s '%s' but failed!", -- cgit 1.2.3-korg