Class: Merb::Rack::ConditionalGet
- Inherits:
-
Middleware
- Object
- Middleware
- Merb::Rack::ConditionalGet
- Defined in:
- lib/merb-core/rack/middleware/conditional_get.rb
Instance Method Summary collapse
-
#call(env) ⇒ Object
:api: plugin.
Methods inherited from Middleware
Methods included from DeferrableMiddleware
Constructor Details
This class inherits a constructor from Merb::Rack::Middleware
Instance Method Details
#call(env) ⇒ Object
:api: plugin
7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/merb-core/rack/middleware/conditional_get.rb', line 7 def call(env) status, headers, body = @app.call(env) if document_not_modified?(env, headers) status = 304 body = Merb::Const::EMPTY_STRING # set Date header using RFC1123 date format as specified by HTTP # RFC2616 section 3.3.1. end [status, headers, body] end |