diff options
| author | Robert Bielik <robert.bielik@dirac.com> | 2020-01-28 07:43:09 +0100 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2020-01-27 22:43:09 -0800 |
| commit | 2545add6240145b419357b9260ae5e8c0d95ba6c (patch) | |
| tree | 155ae2ccfc4c720df7206c7fc81f68531624bc35 /src/supplemental/http/http_api.h | |
| parent | 9414a69a9575564d04022aef9bd898028e52bf09 (diff) | |
| download | nng-2545add6240145b419357b9260ae5e8c0d95ba6c.tar.gz nng-2545add6240145b419357b9260ae5e8c0d95ba6c.tar.bz2 nng-2545add6240145b419357b9260ae5e8c0d95ba6c.zip | |
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
Diffstat (limited to 'src/supplemental/http/http_api.h')
| -rw-r--r-- | src/supplemental/http/http_api.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/supplemental/http/http_api.h b/src/supplemental/http/http_api.h index 45738318..6be681a9 100644 --- a/src/supplemental/http/http_api.h +++ b/src/supplemental/http/http_api.h @@ -301,6 +301,13 @@ extern void nni_http_handler_collect_body(nni_http_handler *, bool, size_t); // will probably need to inspect the URL of the request. extern int nni_http_handler_set_tree(nni_http_handler *); +// nni_http_handler_set_tree_exclusive marks the handler as servicing the +// entire tree (e.g. a directory) exclusively, rather than just a leaf node. +// When servicing a tree exclusively, other handlers sharing parts of the uri +// will induce an address conflict when adding them to a server. The handler +// will probably need to inspect the URL of the request. +extern int nni_http_handler_set_tree_exclusive(nni_http_handler *); + // nni_http_handler_set_host limits the handler to only being called for // the given Host: field. This can be used to set up multiple virtual // hosts. Note that host names must match exactly. If NULL or an empty |
