Method: Gem::Net::HTTPHeader#connection_keep_alive?
- Defined in:
- lib/rubygems/net-http/lib/net/http/header.rb
#connection_keep_alive? ⇒ Boolean
Returns whether the HTTP session is to be kept alive.
974 975 976 977 978 979 |
# File 'lib/rubygems/net-http/lib/net/http/header.rb', line 974 def connection_keep_alive? token = /(?:\A|,)\s*keep-alive\s*(?:\z|,)/i @header['connection']&.grep(token) {return true} @header['proxy-connection']&.grep(token) {return true} false end |