From 2545add6240145b419357b9260ae5e8c0d95ba6c Mon Sep 17 00:00:00 2001 From: Robert Bielik Date: Tue, 28 Jan 2020 07:43:09 +0100 Subject: Add possibility to explicitly set a tree handler as exclusive (#1158) - Default tree handler behavior is now non-exclusive - Add 'longest uri first' ordering for http handlers --- src/supplemental/http/http_public.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/supplemental/http/http_public.c') diff --git a/src/supplemental/http/http_public.c b/src/supplemental/http/http_public.c index d2e876ab..60ca2693 100644 --- a/src/supplemental/http/http_public.c +++ b/src/supplemental/http/http_public.c @@ -635,6 +635,17 @@ nng_http_handler_set_tree(nng_http_handler *h) #endif } +int +nng_http_handler_set_tree_exclusive(nng_http_handler *h) +{ +#ifdef NNG_SUPP_HTTP + return (nni_http_handler_set_tree_exclusive(h)); +#else + NNI_ARG_UNUSED(h); + return (NNG_ENOTSUP); +#endif +} + int nng_http_handler_set_data(nng_http_handler *h, void *dat, void (*dtor)(void *)) { -- cgit v1.2.3-70-g09d2