From 10f6fc5141a15e368dac813a38942cb66d5ddef4 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sun, 22 Dec 2024 12:18:33 -0800 Subject: HTTP handler: limit host names to 256 bytes (RFC 1035 specifies 253.) This also makes `nng_http_handler_set_host` never fail (API break). --- include/nng/supplemental/http/http.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') 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 -- cgit v1.2.3-70-g09d2