lib/woothee/misc.rb in woothee-1.5.0 vs lib/woothee/misc.rb in woothee-1.7.0
- old
+ new
@@ -44,9 +44,11 @@
[Woothee::DataSet.get('HTTPLibrary'), 'ruby']
when ua =~ /^(Python-urllib\/|Twisted )/o
[Woothee::DataSet.get('HTTPLibrary'), 'python']
when ua =~ /^(?:PHP|WordPress|CakePHP|PukiWiki|PECL::HTTP)(?:\/| |$)/o || ua =~ /(?:PEAR |)HTTP_Request(?: class|2)/o
[Woothee::DataSet.get('HTTPLibrary'), 'php']
+ when ua.index('curl/') == 0
+ [Woothee::DataSet.get('HTTPLibrary'), 'curl']
else [nil,nil]
end
return false unless data
update_map(result, data)