Method: HTTP.keep_alive_enabled?
- Defined in:
- lib/httpclient/http.rb
.keep_alive_enabled?(version) ⇒ Boolean
56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/httpclient/http.rb', line 56 def keep_alive_enabled?(version) ProtocolVersionRegexp =~ version if !($1 and $2) false elsif $1.to_i > 1 true elsif $1.to_i == 1 and $2.to_i >= 1 true else false end end |