aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2024-12-22 12:18:33 -0800
committerGarrett D'Amore <garrett@damore.org>2024-12-22 12:18:33 -0800
commit10f6fc5141a15e368dac813a38942cb66d5ddef4 (patch)
treed6ebd5663b2aeb876840e5e2560cae77264d1abc /include
parent497b8e22047fb0efa3397289d23656d6483fdd6d (diff)
downloadnng-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 'include')
-rw-r--r--include/nng/supplemental/http/http.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/nng/supplemental/http/http.h b/include/nng/supplemental/http/http.h
index fa485243..729e25ad 100644
--- a/include/nng/supplemental/http/http.h
+++ b/include/nng/supplemental/http/http.h
@@ -362,7 +362,7 @@ NNG_DECL int nng_http_handler_set_method(nng_http_handler *, const char *);
// default, then the Host: header is not considered when matching the
// handler.) Note that the Host: header must match *exactly* (except
// that case is not considered.)
-NNG_DECL int nng_http_handler_set_host(nng_http_handler *, const char *);
+NNG_DECL void nng_http_handler_set_host(nng_http_handler *, const char *);
// nng_http_handler_collect_body is used to indicate the server should
// check for, and process, data sent by the client, which will be attached