diff options
| author | Garrett D'Amore <garrett@damore.org> | 2024-12-22 12:27:49 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2024-12-22 12:27:49 -0800 |
| commit | 2662596f105fc98ae1d2aa3b6137261bb351a8df (patch) | |
| tree | 0c23c11eab6229cd7481a6294e1b447a6f309de7 /docs | |
| parent | 10f6fc5141a15e368dac813a38942cb66d5ddef4 (diff) | |
| download | nng-2662596f105fc98ae1d2aa3b6137261bb351a8df.tar.gz nng-2662596f105fc98ae1d2aa3b6137261bb351a8df.tar.bz2 nng-2662596f105fc98ae1d2aa3b6137261bb351a8df.zip | |
HTTP: nng_http_handler_set_method no longer fails
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/man/nng_http_handler_set_method.3http.adoc | 15 | ||||
| -rw-r--r-- | docs/ref/migrate/nng1.md | 10 |
2 files changed, 8 insertions, 17 deletions
diff --git a/docs/man/nng_http_handler_set_method.3http.adoc b/docs/man/nng_http_handler_set_method.3http.adoc index f79f0faf..17c4481d 100644 --- a/docs/man/nng_http_handler_set_method.3http.adoc +++ b/docs/man/nng_http_handler_set_method.3http.adoc @@ -20,7 +20,7 @@ nng_http_handler_set_method - set HTTP handler method #include <nng/nng.h> #include <nng/supplemental/http/http.h> -int nng_http_handler_set_method(nng_http_handler *handler, const char *method); +void nng_http_handler_set_method(nng_http_handler *handler, const char *method); ---- == DESCRIPTION @@ -36,22 +36,11 @@ NOTE: The server will automatically call "GET" handlers if the client sends a "HEAD" request, and will suppress HTTP body data in the responses sent for such requests. -NOTE: No validation of the _method_ is performed, but HTTP specifications -insist that the actual method sent over the wire be capitalized. +NOTE: If _method_ is longer than 32-bytes, it may be truncated silently. The handler may always examine the actual method used using the xref:nng_http_req_get_method.3http.adoc[`nng_http_req_get_method()`] function. -== RETURN VALUES - -This function returns 0 on success, and non-zero otherwise. - -== ERRORS - -[horizontal] -`NNG_ENOMEM`:: Insufficient free memory exists. -`NNG_ENOTSUP`:: No support for HTTP in the library. - == SEE ALSO [.text-left] diff --git a/docs/ref/migrate/nng1.md b/docs/ref/migrate/nng1.md index 544f15b6..8035f854 100644 --- a/docs/ref/migrate/nng1.md +++ b/docs/ref/migrate/nng1.md @@ -229,11 +229,13 @@ they may be silently truncated to the limit: - HTTP Method names are limited to 32 bytes (the longest IANA registered method is currently 18 bytes, used for WebDAV.) - The fixed part of URI pathnames used with HTTP handlers is limited to 1024 bytes. -The following API changes are present: +The following API calls have changed so that they are `void` returns, and cannot fail. +They may silently truncate data, and the handler methods may not have any effect if the handler is already in use. -- [`nng_http_req_set_method`] no longer returns a value, and cannot fail. -- [`nng_http_res_set_status`] no longer returns a value, and cannot fail. -- [`nng_http_handler_set_host`] no longer returns a value and cannot fail. +- [`nng_http_req_set_method`] +- [`nng_http_res_set_status`] +- [`nng_http_handler_set_host`] +- [`nng_http_handler_set_method`] ## Security Descriptors (Windows Only) |
