Sha256: ffe24dde84799c62d4c3115d137c86e407c8623d1679620a925cd6b8c68db530
Contents?: true
Size: 659 Bytes
Versions: 19
Compression:
Stored size: 659 Bytes
Contents
# frozen_string_literal: true # Released under the MIT License. # Copyright, 2019-2024, by Samuel Williams. # Copyright, 2024, by Thomas Morgan. require_relative 'split' module Protocol module HTTP module Header class Connection < Split KEEP_ALIVE = 'keep-alive' CLOSE = 'close' UPGRADE = 'upgrade' def initialize(value = nil) super(value&.downcase) end def << value super(value.downcase) end def keep_alive? self.include?(KEEP_ALIVE) && !close? end def close? self.include?(CLOSE) end def upgrade? self.include?(UPGRADE) end end end end end
Version data entries
19 entries across 19 versions & 1 rubygems