From: Vsevolod Stakhov Date: Tue, 18 Feb 2020 17:05:27 +0000 (+0000) Subject: [Minor] Fix trailing slash normalisation X-Git-Tag: 2.4~38 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=814c0d16ad4a3ff44b09879e0d7b5aafbe7a941d;p=thirdparty%2Frspamd.git [Minor] Fix trailing slash normalisation --- diff --git a/src/libserver/http/http_util.c b/src/libserver/http/http_util.c index 89e74a94b7..f9e5b3e776 100644 --- a/src/libserver/http/http_util.c +++ b/src/libserver/http/http_util.c @@ -497,6 +497,17 @@ rspamd_http_normalize_path_inplace (gchar *path, guint len, guint *nlen) } } break; + case st_got_dot: + if (slash) { + /* /. -> must be / */ + *o++ = '/'; + } + else { + if (o > path) { + *o++ = '.'; + } + } + break; case st_got_slash: *o++ = '/'; break;