}
upstream_ok (&rep->request->server->up, rep->request->time);
rep->request->func (rep, rep->request->arg);
- remove_normal_event (req->session, dns_fin_cb, req);
}
}
}
if rule['type'] == 'ip' then
if rule['cdb'] then
local ip = task:get_from_ip()
- if rule['hash']:lookup(ip) then
+ if ip and rule['hash']:lookup(ip) then
task:insert_result(rule['symbol'], 1)
end
else
local ip = task:get_from_ip_num()
- if rule['ips']:get_key(ip) then
+ if ip and rule['ips']:get_key(ip) then
task:insert_result(rule['symbol'], 1)
end
end
-- Search inside urls
urls = task:get_urls()
if urls then
- for _,url in urls do
+ for _,url in ipairs(urls) do
if trie['trie']:search_text(url:get_text()) then
task:insert_result(trie['symbol'], 1)
end