From 7eedffbb4b6390d2deb4bbc9c0feca8c3ebd3b99 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 13 Jun 2016 17:30:54 +0100 Subject: [PATCH] [Feature] Implement https maps --- src/libutil/map.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/libutil/map.c b/src/libutil/map.c index d334f68ee..9bf6e5760 100644 --- a/src/libutil/map.c +++ b/src/libutil/map.c @@ -997,12 +997,11 @@ rspamd_map_check_proto (struct rspamd_config *cfg, } else if (g_ascii_strncasecmp (pos, "https://", sizeof ("https://") - 1) == 0) { bk->protocol = MAP_PROTO_HTTPS; - /* Include http:// */ + /* Include https:// */ bk->uri = g_strdup (pos); pos += sizeof ("https://") - 1; } - else if (g_ascii_strncasecmp (pos, "file://", sizeof ("file://") - - 1) == 0) { + else if (g_ascii_strncasecmp (pos, "file://", sizeof ("file://") - 1) == 0) { pos += sizeof ("file://") - 1; /* Exclude file:// */ bk->uri = g_strdup (pos); @@ -1037,7 +1036,10 @@ rspamd_map_is_map (const gchar *map_line) else if (g_ascii_strncasecmp (map_line, "file://", sizeof ("file://") - 1) == 0) { ret = TRUE; } - else if (g_ascii_strncasecmp (map_line, "http://", sizeof ("file://") - 1) == 0) { + else if (g_ascii_strncasecmp (map_line, "http://", sizeof ("http://") - 1) == 0) { + ret = TRUE; + } + else if (g_ascii_strncasecmp (map_line, "https://", sizeof ("https://") - 1) == 0) { ret = TRUE; } -- 2.39.5