aboutsummaryrefslogtreecommitdiffstats
path: root/activeresource/lib
diff options
context:
space:
mode:
Diffstat (limited to 'activeresource/lib')
-rw-r--r--activeresource/lib/active_resource/connection.rb15
1 files changed, 6 insertions, 9 deletions
diff --git a/activeresource/lib/active_resource/connection.rb b/activeresource/lib/active_resource/connection.rb
index 5f86d77a26..46d462dbe7 100644
--- a/activeresource/lib/active_resource/connection.rb
+++ b/activeresource/lib/active_resource/connection.rb
@@ -127,16 +127,13 @@ module ActiveResource
end
end
- # Creates new (or uses currently instantiated) Net::HTTP instance for communication with
+ # Creates new Net::HTTP instance for communication with
# remote service and resources.
def http
- unless @http
- @http = Net::HTTP.new(@site.host, @site.port)
- @http.use_ssl = @site.is_a?(URI::HTTPS)
- @http.verify_mode = OpenSSL::SSL::VERIFY_NONE if @http.use_ssl
- end
-
- @http
+ http = Net::HTTP.new(@site.host, @site.port)
+ http.use_ssl = @site.is_a?(URI::HTTPS)
+ http.verify_mode = OpenSSL::SSL::VERIFY_NONE if http.use_ssl
+ http
end
def default_header
@@ -157,4 +154,4 @@ module ActiveResource
ActiveResource::Base.logger
end
end
-end \ No newline at end of file
+end