aboutsummaryrefslogtreecommitdiff
path: root/src/supplemental/http/http_server.c
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2025-01-12 13:50:32 -0800
committerGarrett D'Amore <garrett@damore.org>2025-01-12 13:50:32 -0800
commitd88484cafbf973d55dc95b7edcae5064efa8bad0 (patch)
treede5ec0325765b7e4ffddd4e88c1f75e423b0564d /src/supplemental/http/http_server.c
parentc34abc224e572b19fb5aa1b5afc8841705485d14 (diff)
downloadnng-d88484cafbf973d55dc95b7edcae5064efa8bad0.tar.gz
nng-d88484cafbf973d55dc95b7edcae5064efa8bad0.tar.bz2
nng-d88484cafbf973d55dc95b7edcae5064efa8bad0.zip
http: fix mishandling of very long headers or URIs, and mishandling of unicode
Also, nng_err is now a distinct type which might be nicer in debuggers.
Diffstat (limited to 'src/supplemental/http/http_server.c')
-rw-r--r--src/supplemental/http/http_server.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/supplemental/http/http_server.c b/src/supplemental/http/http_server.c
index 9a9a619f..0092299d 100644
--- a/src/supplemental/http/http_server.c
+++ b/src/supplemental/http/http_server.c
@@ -433,15 +433,7 @@ http_sconn_rxdone(void *arg)
const char *cls;
if ((rv = nni_aio_result(aio)) != 0) {
- if (rv == NNG_EMSGSIZE) {
- sc->close = true;
- http_sconn_error(sc,
- nni_http_parsed(sc->conn)
- ? NNG_HTTP_STATUS_HEADERS_TOO_LARGE
- : NNG_HTTP_STATUS_URI_TOO_LONG);
- } else {
- http_sconn_close(sc);
- }
+ http_sconn_close(sc);
return;
}