From: Vsevolod Stakhov Date: Mon, 13 Jun 2016 16:30:54 +0000 (+0100) Subject: [Feature] Implement https maps X-Git-Tag: 1.3.0~356 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7eedffbb4b6390d2deb4bbc9c0feca8c3ebd3b99;p=thirdparty%2Frspamd.git [Feature] Implement https maps --- diff --git a/src/libutil/map.c b/src/libutil/map.c index d334f68eee..9bf6e57604 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; }