Permalink
Browse files

Do that when initializing the object.

  • Loading branch information...
1 parent dc0bf1c commit b8a77f175bfa7699ccc50dea99dc2cd5e9b62b61 @mpereira mpereira committed Nov 9, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/support/response_fetcher.rb
View
4 lib/support/response_fetcher.rb
@@ -41,8 +41,8 @@ def fetch
fetcher = lambda do |uri, redirections_left|
raise TooManyRedirectionsError if redirections_left == 0
parsed_uri = URI.parse(uri)
- request = Net::HTTP::Get.new(request_uri.call(parsed_uri))
- request['User-Agent'] = USER_AGENT
+ request = Net::HTTP::Get.new(request_uri.call(parsed_uri),
+ 'User-Agent' => USER_AGENT)
http = Net::HTTP.new(parsed_uri.host || 'http', parsed_uri.port)
http.open_timeout = http.read_timeout = TIMEOUT
if parsed_uri.port == 443

0 comments on commit b8a77f1

Please sign in to comment.