Sha256: bfc8b828894675d79b28ca4bffd671d9ae44d4e50f24db84c63e89c946020cd1

Contents?: true

Size: 483 Bytes

Versions: 5

Compression:

Stored size: 483 Bytes

Contents

module Rack::Cache
  begin
    # For `Rack::Headers` (Rack 3+):
    require "rack/headers"
    Headers = ::Rack::Headers
    def self.Headers(headers)
      Headers[headers]
    end
  rescue LoadError
    # For `Rack::Utils::HeaderHash`:
    require "rack/utils"
    Headers = ::Rack::Utils::HeaderHash
    def self.Headers(headers)
      if headers.is_a?(Headers) && !headers.frozen?
        return headers
      else
        return Headers.new(headers)
      end
    end
  end
end

Version data entries

5 entries across 4 versions & 2 rubygems

Version Path
trusty-cms-7.0.9.1 vendor/bundle/ruby/3.1.0/gems/rack-cache-1.17.0/lib/rack/cache/headers.rb
trusty-cms-7.0.9.1 vendor/bundle/ruby/3.3.0/gems/rack-cache-1.17.0/lib/rack/cache/headers.rb
rack-cache-1.17.0 lib/rack/cache/headers.rb
rack-cache-1.16.0 lib/rack/cache/headers.rb
rack-cache-1.15.0 lib/rack/cache/headers.rb