Sha256: 3ecedde4e5c61cbeb46e50ec4f05d4ce42c0e0e58469da71e479e7af1a368da6

Contents?: true

Size: 304 Bytes

Versions: 10

Compression:

Stored size: 304 Bytes

Contents

module Rack::App::InstanceMethods::ServeFile

  def serve_file(file_path)
    raw_rack_resp = Rack::App::FileServer.serve_file(request.env, file_path)
    response.status = raw_rack_resp[0]
    response.headers.merge!(raw_rack_resp[1])
    response.body = raw_rack_resp[2]
    finish_response
  end

end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
rack-app-5.5.1 lib/rack/app/instance_methods/serve_file.rb
rack-app-5.4.0 lib/rack/app/instance_methods/serve_file.rb
rack-app-5.3.2 lib/rack/app/instance_methods/serve_file.rb
rack-app-5.3.1 lib/rack/app/instance_methods/serve_file.rb
rack-app-5.3.0 lib/rack/app/instance_methods/serve_file.rb
rack-app-5.2.0 lib/rack/app/instance_methods/serve_file.rb
rack-app-5.1.0 lib/rack/app/instance_methods/serve_file.rb
rack-app-5.0.0 lib/rack/app/instance_methods/serve_file.rb
rack-app-5.0.0.rc2 lib/rack/app/instance_methods/serve_file.rb
rack-app-5.0.0.rc1 lib/rack/app/instance_methods/serve_file.rb