Skip to content

Commit

Permalink
Merge pull request #47094 from zzak/rack-3-files-continued
Browse files Browse the repository at this point in the history
Replace deprecated Rack::File with Rack::Files
  • Loading branch information
rafaelfranca authored Jan 25, 2023
2 parents 0236339 + 12de399 commit e572f23
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion actionpack/lib/action_dispatch/middleware/static.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def call(env)
end
end

# This endpoint serves static files from disk using +Rack::File+.
# This endpoint serves static files from disk using +Rack::Files+.
#
# URL paths are matched with static files according to expected
# conventions: +path+, +path+.html, +path+/index.html.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
module ActiveStorage::FileServer # :nodoc:
private
def serve_file(path, content_type:, disposition:)
Rack::File.new(nil).serving(request, path).tap do |(status, headers, body)|
::Rack::Files.new(nil).serving(request, path).tap do |(status, headers, body)|
self.status = status
self.response_body = body

Expand Down

0 comments on commit e572f23

Please sign in to comment.