Project

General

Profile

Defect #3480 » allow_empty_user_agent.patch

Jérémy Lal, 2010-06-18 00:36

View differences:

lib/bots_filter.rb.new 2010-06-18 00:37:16.300475863 +0200
BOTS_USER_AGENT_RE = Regexp.new("(#{BOTS_USER_AGENT.collect {|a| Regexp.escape(a)}.join('|')})", Regexp::IGNORECASE)
def bot_request?
request.user_agent.match(BOTS_USER_AGENT_RE)
if request.user_agent.blank?
return false
end
request.user_agent.match(BOTS_USER_AGENT_RE)
end
end
(2-2/2)