diff options
| author | Garrett D'Amore <garrett@damore.org> | 2025-01-12 09:01:33 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2025-01-12 09:24:29 -0800 |
| commit | 169166a0ef4fad56860c40ba2eda23f27b8a4cb1 (patch) | |
| tree | 20f9ab16bb077af353148b108eb884d1a9e9fa1d /src/supplemental/http/http_msg.c | |
| parent | 4f445061dc9dbc1e437ff04eff6f39f021bd5bec (diff) | |
| download | nng-169166a0ef4fad56860c40ba2eda23f27b8a4cb1.tar.gz nng-169166a0ef4fad56860c40ba2eda23f27b8a4cb1.tar.bz2 nng-169166a0ef4fad56860c40ba2eda23f27b8a4cb1.zip | |
http: use common canonify at request parse time
Diffstat (limited to 'src/supplemental/http/http_msg.c')
| -rw-r--r-- | src/supplemental/http/http_msg.c | 4 |
1 files changed, 3 insertions, 1 deletions
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); } |
