Module: Rack::Cache::RequestHeaders
Overview
HTTP request header helpers. When included in Rack::Cache::Request, headers may be accessed by their standard RFC 2616 names using the #headers Hash.
Instance Method Summary collapse
-
#headers ⇒ Object
A Hash-like object providing access to HTTP request headers.
-
#if_modified_since ⇒ Object
The literal value of the If-Modified-Since request header or nil when no If-Modified-Since header is present.
-
#if_none_match ⇒ Object
The literal value of the If-None-Match request header or nil when no If-None-Match header is present.
Methods included from Headers
#cache_control, #cache_control=, #etag, #header?
Instance Method Details
#headers ⇒ Object
A Hash-like object providing access to HTTP request headers.
61 62 63 |
# File 'lib/rack/cache/headers.rb', line 61 def headers @headers ||= Rack::Utils::EnvironmentHeaders.new(env) end |
#if_modified_since ⇒ Object
The literal value of the If-Modified-Since request header or nil when no If-Modified-Since header is present.
67 68 69 |
# File 'lib/rack/cache/headers.rb', line 67 def if_modified_since headers['If-Modified-Since'] end |
#if_none_match ⇒ Object
The literal value of the If-None-Match request header or nil when no If-None-Match header is present.
73 74 75 |
# File 'lib/rack/cache/headers.rb', line 73 def if_none_match headers['If-None-Match'] end |