Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
Net::HTTPHeader#connection_keep_alive?
() -> bool
connection_keep_alive?
lib/net/http/header.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.4.1/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
Returns whether the HTTP session is to be kept alive.
See also
#connection_close?
#content_length
#chunked?
#content_length=
also in
4.1 · 4.0 · 3.3 · 3.2 · 3.1 · 3.0