Module: AWS::Core::Http

Defined in:
lib/aws/core.rb,
lib/aws/core/http/patch.rb,
lib/aws/core/http/handler.rb,
lib/aws/core/http/request.rb,
lib/aws/core/http/response.rb,
lib/aws/core/http/curb_handler.rb,
lib/aws/core/http/connection_pool.rb,
lib/aws/core/http/net_http_handler.rb

Defined Under Namespace

Classes: NetHttpHandler, Request, Response

Class Method Summary collapse

Class Method Details

.patch_net_http_100_continue!Object



23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/aws/core/http/patch.rb', line 23

def self.patch_net_http_100_continue!
  if RUBY_VERSION >= '2.0'
    Net::HTTP.send(:include, Expect100Continue20)
  elsif RUBY_VERSION >= '1.9.3'
    Net::HTTP.send(:include, Expect100Continue19)
  else
    msg = "Expect 100-continue not supported in Ruby < 1.9.3"
    raise NotImplementedError, msg
  end
  Net::HTTP.send(:alias_method, :old_transport_request, :transport_request)
  Net::HTTP.send(:alias_method, :transport_request, :new_transport_request)
end