From eaf81fb2b8efe1aae890f5ee5c25326a2fe647bc Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 5 Jun 2018 13:56:13 +0100 Subject: [PATCH] [Minor] Fix some corner cases --- src/libserver/url.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libserver/url.c b/src/libserver/url.c index 8e4cb2133..d9ddf8357 100644 --- a/src/libserver/url.c +++ b/src/libserver/url.c @@ -1016,7 +1016,8 @@ rspamd_web_parse (struct http_parser_url *u, const gchar *str, gsize len, while (tmp < last) { if (!g_ascii_isdigit (*tmp)) { - if (*tmp == '/' || *tmp == '#' || *tmp == '?') { + if (*tmp == '/' || *tmp == '#' || *tmp == '?' || + is_url_end (*tmp)) { /* Port + something */ st = parse_port; c = slash; -- 2.39.5