{
struct http_parser_url u;
gchar *p, *comp;
- gint i, complen;
+ guint i, complen;
const struct {
enum rspamd_url_protocol proto;
if (pos > begin && *pos == '@') {
/* Try to extract it with username */
p = pos - 1;
- while (p > begin && (is_domain (*p) || *p == '.' || *p == '_')) {
+ while (p > begin && is_atom (*p)) {
p--;
}
- if (!is_domain (*p) && p != pos - 1) {
+ if (!is_atom (*p) && p != pos - 1) {
match->m_begin = p + 1;
return TRUE;
}
}
else {
p = pos + strlen (match->pattern);
- if (is_domain (*p)) {
+ if (is_atom (*p)) {
match->m_begin = pos;
return TRUE;
}