]> source.dussan.org Git - rspamd.git/commitdiff
[Feature] Implement https maps
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 13 Jun 2016 16:30:54 +0000 (17:30 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 13 Jun 2016 16:31:29 +0000 (17:31 +0100)
src/libutil/map.c

index d334f68eee8b9f4b9d3997d6708ce71d1edeaa8f..9bf6e57604fdc015cd7e31bf19a20f9342481494 100644 (file)
@@ -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;
        }