commit 814c0d1: [Minor] Fix trailing slash normalisation
Vsevolod Stakhov
vsevolod at highsecure.ru
Tue Feb 18 17:07:06 UTC 2020
Author: Vsevolod Stakhov
Date: 2020-02-18 17:05:27 +0000
URL: https://github.com/rspamd/rspamd/commit/814c0d16ad4a3ff44b09879e0d7b5aafbe7a941d (HEAD -> master)
[Minor] Fix trailing slash normalisation
---
src/libserver/http/http_util.c | 11 +++++++++++
1 file changed, 11 insertions(+)
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;
More information about the Commits
mailing list