From 169166a0ef4fad56860c40ba2eda23f27b8a4cb1 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sun, 12 Jan 2025 09:01:33 -0800 Subject: http: use common canonify at request parse time --- src/supplemental/http/http_msg.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/supplemental/http/http_msg.c') diff --git a/src/supplemental/http/http_msg.c b/src/supplemental/http/http_msg.c index 8c62fb5f..3c4ce491 100644 --- a/src/supplemental/http/http_msg.c +++ b/src/supplemental/http/http_msg.c @@ -16,6 +16,7 @@ #include "core/list.h" #include "core/nng_impl.h" +#include "core/url.h" #include "http_api.h" #include "http_msg.h" #include "nng/http.h" @@ -231,7 +232,8 @@ http_req_parse_line(nng_http *conn, void *line) version++; nni_http_set_method(conn, method); - if (((rv = nni_http_set_uri(conn, uri, NULL)) != 0) || + if (((rv = nni_url_canonify_uri(uri)) != 0) || + ((rv = nni_http_set_uri(conn, uri, NULL)) != 0) || ((rv = nni_http_set_version(conn, version)) != 0)) { return (rv); } -- cgit v1.2.3-70-g09d2