Protocol::HTTP SourceProtocolHTTPHeaderETags

class ETags

Definitions

def match?(etag)

This implementation is not strictly correct according to the RFC-specified format.

Implementation

def match?(etag)
	wildcard? || self.include?(etag)
end

def strong_match?(etag)

Useful with If-Match

Implementation

def strong_match?(etag)
	wildcard? || (!weak_tag?(etag) && self.include?(etag))
end

def weak_match?(etag)

Useful with If-None-Match

Implementation

def weak_match?(etag)
	wildcard? || self.include?(etag) || self.include?(opposite_tag(etag))
end