--- lib/bots_filter.rb 2010-06-18 00:36:29.880478728 +0200 +++ lib/bots_filter.rb.new 2010-06-18 00:37:16.300475863 +0200 @@ -41,7 +41,10 @@ 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