class Net::HTTP

Public Instance Methods

keep_alive?(req, res) click to toggle source
# File lib/mechanize/monkey_patch.rb, line 4
def keep_alive?(req, res)
  return false if /close/ =~ req['connection'].to_s
  return false if @seems_1_0_server
  return false if /close/      =~ res['connection'].to_s
  return true  if /keep-alive/ =~ res['connection'].to_s
  return false if /close/      =~ res['proxy-connection'].to_s
  return true  if /keep-alive/ =~ res['proxy-connection'].to_s
  (@curr_http_version == '1.1')
end
Also aliased as: old_keep_alive?
old_keep_alive?(req, res)
Alias for: keep_alive?