aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-11-16 13:56:06 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-11-16 13:56:06 +0000
commit3390bdc6e0cbbfac91f91f2d6f707453a1435bd7 (patch)
tree52119304dea9ef45c2bd35a19c39d82ab0ecafe7 /src/libserver
parent454f4676389738808d2231d6813e5eb70167efbe (diff)
downloadrspamd-3390bdc6e0cbbfac91f91f2d6f707453a1435bd7.tar.gz
rspamd-3390bdc6e0cbbfac91f91f2d6f707453a1435bd7.zip
Fix parsing of fragment in urls
Diffstat (limited to 'src/libserver')
-rw-r--r--src/libserver/url.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/libserver/url.c b/src/libserver/url.c
index 95773baa0..186697483 100644
--- a/src/libserver/url.c
+++ b/src/libserver/url.c
@@ -754,7 +754,7 @@ rspamd_web_parse (struct http_parser_url *u, const gchar *str, gsize len,
}
break;
case parse_domain:
- if (t == '/' || t == ':' || t == '?') {
+ if (t == '/' || t == ':' || t == '?' || t == '#') {
if (p - c == 0) {
goto out;
}
@@ -767,6 +767,11 @@ rspamd_web_parse (struct http_parser_url *u, const gchar *str, gsize len,
st = parse_query;
c = p + 1;
}
+ else if (t == '#') {
+ SET_U (u, UF_HOST);
+ st = parse_part;
+ c = p + 1;
+ }
else if (!user_seen) {
/*
* Here we can have both port and password, hence we need