aboutsummaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2024-12-22 12:57:19 -0800
committerGarrett D'Amore <garrett@damore.org>2024-12-22 13:03:35 -0800
commita24b4f11799806e08638162901039fd23efe48be (patch)
tree24f29c8eeb234c1228615478555c3c4d2fcdb761 /docs/ref
parentd60a16af349de45477efc566760130b51ff7cf1e (diff)
downloadnng-a24b4f11799806e08638162901039fd23efe48be.tar.gz
nng-a24b4f11799806e08638162901039fd23efe48be.tar.bz2
nng-a24b4f11799806e08638162901039fd23efe48be.zip
http: limit handler uri to 1K
This is just the part of the tree that will be matched when looking up a handler. Requests may come in with very much longer URIs, and be matched to the handler as a "subdirectory". This approach makes it possible to avoid a dynamic allocation on the handler, at the cost of pre-allocating 1KB with the handler object. This size can be overridden using a NNG_HTTP_MAX_URI at compile time.
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/migrate/nng1.md3
1 files changed, 2 insertions, 1 deletions
diff --git a/docs/ref/migrate/nng1.md b/docs/ref/migrate/nng1.md
index 4390de24..0d6ae86d 100644
--- a/docs/ref/migrate/nng1.md
+++ b/docs/ref/migrate/nng1.md
@@ -227,7 +227,8 @@ they may be silently truncated to the limit:
- Hostnames are limited per RFC 1035 to 253 characters (not including terminating "." or zero byte.)
- 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 fixed part of URI pathnames used with HTTP handlers is limited to 1024 bytes. (Longer URIs may be accepted
+ by using [`nng_http_handler_set_tree`] and matching a parent of the directory component.)
The following API calls have changed so that they are `void` returns, and cannot fail.
They may silently truncate data.