Sha256: d4362a720478812e4cf8dafcaa0a83b7bb3891207a5be963dd40ea9eaa5e451e

Contents?: true

Size: 506 Bytes

Versions: 4

Compression:

Stored size: 506 Bytes

Contents

module Net
  class HTTP
    alias :old_keep_alive? :keep_alive?
    def keep_alive?(req, res)
      return false if /close/i =~ req['connection'].to_s
      return false if @seems_1_0_server
      return false if /close/i      =~ res['connection'].to_s
      return true  if /keep-alive/i =~ res['connection'].to_s
      return false if /close/i      =~ res['proxy-connection'].to_s
      return true  if /keep-alive/i =~ res['proxy-connection'].to_s
      (@curr_http_version == '1.1')
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
mechanize-0.6.10 lib/mechanize/monkey_patch.rb
mechanize-0.6.8 lib/mechanize/monkey_patch.rb
mechanize-0.6.11 lib/mechanize/monkey_patch.rb
mechanize-0.6.9 lib/mechanize/monkey_patch.rb