/* Find lua script */
if (msg->url != NULL && msg->url->len != 0) {
- http_parser_parse_url (msg->url->str, msg->url->len, TRUE, &u);
+ http_parser_parse_url (RSPAMD_FSTRING_DATA (msg->url),
+ RSPAMD_FSTRING_LEN (msg->url), TRUE, &u);
if (u.field_set & (1 << UF_PATH)) {
- lookup.begin = msg->url->str + u.field_data[UF_PATH].off;
+ lookup.begin = RSPAMD_FSTRING_DATA (msg->url) +
+ u.field_data[UF_PATH].off;
lookup.len = u.field_data[UF_PATH].len;
}
else {
- lookup.begin = msg->url->str;
- lookup.len = msg->url->len;
+ lookup.begin = RSPAMD_FSTRING_DATA (msg->url);
+ lookup.len = RSPAMD_FSTRING_LEN (msg->url);
}
rspamd_snprintf (filebuf, sizeof (filebuf), "%s%c%T",
}
else {
/* Need to parse query URL */
- if (http_parser_parse_url (msg->url->str, msg->url->len, 0, &u) != 0) {
+ if (http_parser_parse_url (RSPAMD_FSTRING_DATA (msg->url),
+ RSPAMD_FSTRING_LEN (msg->url), 0, &u) != 0) {
msg_err_session ("bad request url: %V", msg->url);
return FALSE;
}
/* We need to create a new URL with file attribute removed */
- new_url = rspamd_fstring_new_init (msg->url->str,
+ new_url = rspamd_fstring_new_init (RSPAMD_FSTRING_DATA (msg->url),
u.field_data[UF_QUERY].off);
new_url = rspamd_fstring_append (new_url, "?", 1);