Class Net::HTTP
In: lib/www/mechanize/monkey_patch.rb
Parent: Object
HTTPResponse HTTP lib/www/mechanize/monkey_patch.rb Net dot/m_40_1.png

Methods

External Aliases

keep_alive? -> old_keep_alive?

Public Instance methods

[Source]

    # File lib/www/mechanize/monkey_patch.rb, line 4
 4:     def keep_alive?(req, res)
 5:       return false if /close/i =~ req['connection'].to_s
 6:       return false if @seems_1_0_server
 7:       return false if /close/i      =~ res['connection'].to_s
 8:       return true  if /keep-alive/i =~ res['connection'].to_s
 9:       return false if /close/i      =~ res['proxy-connection'].to_s
10:       return true  if /keep-alive/i =~ res['proxy-connection'].to_s
11:       (@curr_http_version == '1.1')
12:     end

[Validate]