| Class | Net::HTTP |
| In: |
lib/mechanize/monkey_patch.rb
|
| Parent: | Object |
| keep_alive? | -> | old_keep_alive? |
# File lib/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