]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Fix urls encode function
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 13 Jan 2020 13:58:42 +0000 (13:58 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 13 Jan 2020 13:58:42 +0000 (13:58 +0000)
src/libserver/url.c

index cb9c214d28d8708302372fb75390f7a93518f54c..d792177e85de0507b55a4638781b4c36b598a67b 100644 (file)
@@ -3677,13 +3677,13 @@ rspamd_url_encode (struct rspamd_url *url, gsize *pdlen,
        }
 
        if (url->querylen > 0) {
-               *d++ = '/';
+               *d++ = '?';
                ENCODE_URL_COMPONENT ((guchar *)url->query, url->querylen,
                                RSPAMD_URL_FLAGS_QUERYSAFE);
        }
 
        if (url->fragmentlen > 0) {
-               *d++ = '/';
+               *d++ = '#';
                ENCODE_URL_COMPONENT ((guchar *)url->fragment, url->fragmentlen,
                                RSPAMD_URL_FLAGS_FRAGMENTSAFE);
        }