Defect #3480 » allow_empty_user_agent.patch
| 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
|
||
|
|
||
- « Previous
- 1
- 2
- Next »