diff options
| author | Garrett D'Amore <garrett@damore.org> | 2024-12-22 12:18:33 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2024-12-22 12:18:33 -0800 |
| commit | 10f6fc5141a15e368dac813a38942cb66d5ddef4 (patch) | |
| tree | d6ebd5663b2aeb876840e5e2560cae77264d1abc /src/supplemental/http/http_api.h | |
| parent | 497b8e22047fb0efa3397289d23656d6483fdd6d (diff) | |
| download | nng-10f6fc5141a15e368dac813a38942cb66d5ddef4.tar.gz nng-10f6fc5141a15e368dac813a38942cb66d5ddef4.tar.bz2 nng-10f6fc5141a15e368dac813a38942cb66d5ddef4.zip | |
HTTP handler: limit host names to 256 bytes (RFC 1035 specifies 253.)
This also makes `nng_http_handler_set_host` never fail (API break).
Diffstat (limited to 'src/supplemental/http/http_api.h')
| -rw-r--r-- | src/supplemental/http/http_api.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/supplemental/http/http_api.h b/src/supplemental/http/http_api.h index 349f3a49..d759e27b 100644 --- a/src/supplemental/http/http_api.h +++ b/src/supplemental/http/http_api.h @@ -322,7 +322,7 @@ extern int nni_http_handler_set_tree_exclusive(nni_http_handler *); // on port number as we assume that clients MUST have gotten that part right // as we do not support virtual hosting on multiple separate ports; the // server only listens on a single port. -extern int nni_http_handler_set_host(nni_http_handler *, const char *); +extern void nni_http_handler_set_host(nni_http_handler *, const char *); // nni_http_handler_set_method limits the handler to only being called // for the given HTTP method. By default a handler is called for GET |
