Skip to content

Commit

Permalink
fix some insecure error
Browse files Browse the repository at this point in the history
  • Loading branch information
tdtds committed Aug 26, 2012
1 parent e08b892 commit 6df8128
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions plugin/search-bing.rb
Expand Up @@ -13,8 +13,7 @@

require 'timeout'
require 'json'
require 'net/http'
Net::HTTP.version_1_2
require 'open-uri'

def search_title
'全文検索 by Bing'
Expand All @@ -37,7 +36,6 @@ def search_bing_api( q, start = 0 )
u << "?Query=%27#{q}%27&Options=%27EnableHighlighting%27&$top=50&$skip=#{start}&$format=Json"
uri = URI( u )

require 'open-uri'
open( uri, {:http_basic_authentication => [appid, appid]} ).read

### FIX ME: this code failed on Timeout error, temporary using open-uri above.
Expand Down

0 comments on commit 6df8128

Please sign in to comment.