class Protocol::HTTP::Header::Connection
The ‘connection` header is used to specify control options such as whether the connection should be kept alive, closed, or upgraded to a different protocol.
Represents the `connection` HTTP header, which controls options for the current connection.
def << value
Adds a directive to the `connection` header. The value will be normalized to lowercase before being added.
def << value super(value.downcase) end
def close?
def close? self.include?(CLOSE) end
def initialize(value = nil)
Initializes the connection header with the given value. The value is expected to be a comma-separated string of directives.
def initialize(value = nil) super(value&.downcase) end
def keep_alive?
def keep_alive? self.include?(KEEP_ALIVE) && !close? end
def upgrade?
def upgrade? self.include?(UPGRADE) end