Class: Qeweney::Request

Inherits:
Object
  • Object
show all
Defined in:
lib/tp2/request_extensions.rb

Instance Method Summary collapse

Instance Method Details

#respond_with_static_file(path, etag, last_modified, opts) ⇒ Object



4
5
6
7
8
9
10
11
# File 'lib/tp2/request_extensions.rb', line 4

def respond_with_static_file(path, etag, last_modified, opts)
  cache_headers = (etag || last_modified) ? {
    'etag' => etag,
    'last-modified' => last_modified,
  } : {}

  adapter.respond_with_static_file(self, path, opts, cache_headers)
end