aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2020-02-18 17:05:27 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2020-02-18 17:05:27 +0000
commit814c0d16ad4a3ff44b09879e0d7b5aafbe7a941d (patch)
tree8ed79da5b0e7278c3b9317e9c44b51d8636f061e
parent055f794582929022121fdf3bbda7010be9cbf6ed (diff)
downloadrspamd-814c0d16ad4a3ff44b09879e0d7b5aafbe7a941d.tar.gz
rspamd-814c0d16ad4a3ff44b09879e0d7b5aafbe7a941d.zip
[Minor] Fix trailing slash normalisation
-rw-r--r--src/libserver/http/http_util.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/libserver/http/http_util.c b/src/libserver/http/http_util.c
index 89e74a94b..f9e5b3e77 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;