Method: Gem::Net::HTTPHeader#connection_close?
- Defined in:
- lib/rubygems/net-http/lib/net/http/header.rb
#connection_close? ⇒ Boolean
Returns whether the HTTP session is to be closed.
966 967 968 969 970 971 |
# File 'lib/rubygems/net-http/lib/net/http/header.rb', line 966 def connection_close? token = /(?:\A|,)\s*close\s*(?:\z|,)/i @header['connection']&.grep(token) {return true} @header['proxy-connection']&.grep(token) {return true} false end |