lib/httpx/headers.rb in httpx-0.5.0 vs lib/httpx/headers.rb in httpx-0.5.1

- old
+ new

@@ -39,9 +39,18 @@ def freeze @headers.freeze super end + def same_headers?(headers) + @headers.empty? || begin + headers.each do |k, v| + return false unless v == self[k] + end + true + end + end + # merges headers with another header-quack. # the merge rule is, if the header already exists, # ignore what the +other+ headers has. Otherwise, set # def merge(other)