Class: Imprenta::ContentServer::File
- Inherits:
-
Object
- Object
- Imprenta::ContentServer::File
- Defined in:
- lib/imprenta/content_server/file.rb
Instance Method Summary collapse
Instance Method Details
#generate_response(path, env) ⇒ Object
4 5 6 7 8 9 |
# File 'lib/imprenta/content_server/file.rb', line 4 def generate_response(path, env) request = ::Rack::Request.new(env) file, headers = pick_file_and_headers_for_path(path, request) env.merge!("PATH_INFO" => "/") ::Rack::File.new(file, headers).call(env) end |