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
Methods inherited from Middleware
Constructor Details
This class inherits a constructor from Merb::Rack::Middleware
Instance Method Details
#call(env) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/merb-core/rack/middleware/conditional_get.rb', line 5 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 |