aboutsummaryrefslogtreecommitdiff
path: root/docs/man/nng_http_handler_alloc.3http.adoc
diff options
context:
space:
mode:
authorRobert Bielik <robert.bielik@dirac.com>2020-01-28 07:43:09 +0100
committerGarrett D'Amore <garrett@damore.org>2020-01-27 22:43:09 -0800
commit2545add6240145b419357b9260ae5e8c0d95ba6c (patch)
tree155ae2ccfc4c720df7206c7fc81f68531624bc35 /docs/man/nng_http_handler_alloc.3http.adoc
parent9414a69a9575564d04022aef9bd898028e52bf09 (diff)
downloadnng-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 'docs/man/nng_http_handler_alloc.3http.adoc')
-rw-r--r--docs/man/nng_http_handler_alloc.3http.adoc10
1 files changed, 8 insertions, 2 deletions
diff --git a/docs/man/nng_http_handler_alloc.3http.adoc b/docs/man/nng_http_handler_alloc.3http.adoc
index 6504212f..506cdcf9 100644
--- a/docs/man/nng_http_handler_alloc.3http.adoc
+++ b/docs/man/nng_http_handler_alloc.3http.adoc
@@ -2,6 +2,7 @@
//
// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech>
// Copyright 2018 Capitar IT Group BV <info@capitar.com>
+// Copyright 2020 Dirac Research <robert.bielik@dirac.com>
//
// This document is supplied under the terms of the MIT License, a
// copy of which should be located in the distribution where this
@@ -111,10 +112,14 @@ If no such index file exists, then an `NNG_HTTP_STATUS_NOT_FOUND` (404) error is
sent back to the client.
The `Content-Type` will be set automatically based upon the extension
-of the requested file name.
-If a content type cannot be determined from
+of the requested file name. If a content type cannot be determined from
the extension, then `application/octet-stream` is used.
+The directory handler is created as a tree handler initially in exclusive mode (see
+xref:nng_http_handler_set_tree.3http.adoc[nng_http_handler_set_tree_exclusive
+]). This can be changed by calling xref:nng_http_handler_set_tree.3http.adoc
+[nng_http_handler_set_tree(3http)] after creating the directory handler.
+
=== File Handler
The third member of this family, `nng_http_handler_alloc_file()`, creates
@@ -178,6 +183,7 @@ xref:nng_http_handler_free.3http.adoc[nng_http_handler_free(3http)],
xref:nng_http_handler_set_host.3http.adoc[nng_http_handler_set_host(3http)],
xref:nng_http_handler_set_method.3http.adoc[nng_http_handler_set_method(3http)],
xref:nng_http_handler_set_tree.3http.adoc[nng_http_handler_set_tree(3http)],
+xref:nng_http_handler_set_tree.3http.adoc[nng_http_handler_set_tree_exclusive(3http)],
xref:nng_http_res_alloc.3http.adoc[nng_http_res_alloc(3http)],
xref:nng_http_res_alloc_error.3http.adoc[nng_http_res_alloc_error(3http)],
xref:nng_http_server_add_handler.3http.adoc[nng_http_server_add_handler(3http)],