]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Properly set protocol value for urls
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 16 Feb 2019 14:22:19 +0000 (14:22 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 16 Feb 2019 14:22:19 +0000 (14:22 +0000)
src/libserver/url.c

index ae2f84300cbbfe8bb90a3758928975ffee83bd51..4e1b9f3d243ac7075be574a88ad56e44131df709 100644 (file)
@@ -1867,9 +1867,9 @@ rspamd_url_parse (struct rspamd_url *uri,
 
        for (i = 0; i < G_N_ELEMENTS (rspamd_url_protocols); i++) {
                if (uri->protocollen == rspamd_url_protocols[i].len) {
-                       if (memcmp (uri->string, rspamd_url_protocols[i].name, uri->protocollen) ==
-                               0) {
-                               uri->protocol = i;
+                       if (memcmp (uri->string,
+                                       rspamd_url_protocols[i].name, uri->protocollen) == 0) {
+                               uri->protocol = rspamd_url_protocols[i].proto;
                                break;
                        }
                }