summaryrefslogtreecommitdiffstats
path: root/src/plugins/http_static/static_server.c
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2019-10-17 15:53:08 -0400
committerFlorin Coras <florin.coras@gmail.com>2019-10-17 20:59:14 +0000
commit9929561a5d7388e655eadfaf458d27b96f00abd5 (patch)
treef36fd860a00659025097458e08acbe71ab552f50 /src/plugins/http_static/static_server.c
parent19cb04df063a85ab8e416a9f44fd47ff89857901 (diff)
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 <dave@barachs.net> Change-Id: Iadae7b909cf3e8ea179fe93620737fdf68f888ac
Diffstat (limited to 'src/plugins/http_static/static_server.c')
-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 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!",