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