task = param->task;
ret = rspamd_mime_regexp_element_process (param->task, param->re,
- struri (url), 0, FALSE);
+ url->string, url->urllen, FALSE);
param->found = ret;
if (G_UNLIKELY (param->re->is_test)) {
- msg_info_task ("process test regexp %s for url %s returned FALSE",
- param->re->regexp_text, struri (url));
+ msg_info_task ("process test regexp %s for url %*s returned FALSE",
+ param->re->regexp_text, url->urllen, url->string);
}
}
if (surbl_req == NULL) {
if (err != NULL) {
if (err->code != WHITELIST_ERROR && err->code != DUPLICATE_ERROR) {
- msg_info_task ("cannot format url string for surbl %s, %e",
- struri (url),
+ msg_info_task ("cannot format url string for surbl %*s, %e",
+ url->urllen, url->string,
err);
}
g_error_free (err);
}
else if (err != NULL) {
if (err->code != WHITELIST_ERROR && err->code != DUPLICATE_ERROR) {
- msg_info_task ("cannot format url string for surbl %s, %e", struri (
- url), err);
+ msg_info_task ("cannot format url string for surbl %*s, %e",
+ url->urllen,
+ url->string, err);
}
g_error_free (err);
return;
task = param->task;
- g_hash_table_remove (param->tree, struri (param->url));
-
if (msg->code == 200) {
hdr = rspamd_http_message_find_header (msg, "Uri");
if (hdr != NULL) {
- msg_info_task ("<%s> got reply from redirector: '%s' -> '%T'",
+ msg_info_task ("<%s> got reply from redirector: '%*s' -> '%T'",
param->task->message_id,
- struri (param->url),
+ param->url->urllen, param->url->string,
hdr);
urllen = hdr->len;
urlstr = rspamd_mempool_alloc (task->task_pool,
}
}
else {
- msg_info_task ("<%s> could not resolve '%s' on redirector",
+ msg_info_task ("<%s> could not resolve '%*s' on redirector",
param->task->message_id,
- struri (param->url));
+ param->url->urllen, param->url->string);
}
rspamd_upstream_ok (param->redirector);
RSPAMD_HTTP_CLIENT_SIMPLE,
RSPAMD_HTTP_CLIENT, NULL);
msg = rspamd_http_new_message (HTTP_REQUEST);
- msg->url = rspamd_fstring_assign (msg->url, struri (url), strlen (struri (url)));
+ msg->url = rspamd_fstring_assign (msg->url, url->string, url->urllen);
param->sock = s;
param->suffix = suffix;
param->redirector = selected;
NULL, param, s, timeout, task->ev_base);
msg_info_task (
- "<%s> registered redirector call for %s to %s, according to rule: %s",
+ "<%s> registered redirector call for %*s to %s, according to rule: %s",
task->message_id,
- struri (url),
+ url->urllen, url->string,
rspamd_upstream_name (param->redirector),
rule);
}
gboolean found = FALSE;
task = param->task;
- debug_task ("check url %s", struri (url));
+ debug_task ("check url %*s", url->urllen, url->string);
if (url->hostlen <= 0) {
return;
g_list_prepend (NULL, rspamd_mempool_strdup
(task->task_pool, pat->ptr)));
}
-
- if (g_hash_table_lookup (param->tree, struri (url)) == NULL) {
- g_hash_table_insert (param->tree, struri (url), url);
-
- register_redirector_call (url,
- param->task,
- param->suffix,
- pat->ptr,
- param->tree);
- }
+ register_redirector_call (url,
+ param->task,
+ param->suffix,
+ pat->ptr,
+ param->tree);
return;
}