class Protocol::HTTP::Header::ETags
def match?(etag)
def match?(etag) wildcard? || self.include?(etag) end
def opposite_tag(etag)
def opposite_tag(etag) weak_tag?(etag) ? etag[2..-1] : "W/#{etag}" end
def strong_match?(etag)
def strong_match?(etag) wildcard? || (!weak_tag?(etag) && self.include?(etag)) end
def weak_match?(etag)
def weak_match?(etag) wildcard? || self.include?(etag) || self.include?(opposite_tag(etag)) end
def weak_tag?(tag)
def weak_tag?(tag) tag&.start_with? "W/" end
def wildcard?
def wildcard? self.include?("*") end