Skip to content

Commit

Permalink
Make detect_rack_handler compatible with Rack 3 (#2294)
Browse files Browse the repository at this point in the history
  • Loading branch information
osbre authored Aug 9, 2024
1 parent 0148535 commit ba1af83
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions padrino-core/lib/padrino-core/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,9 @@ def start
#
def self.detect_rack_handler
Handlers.each do |handler|

return handler if Rack::Handler.get(handler.to_s.downcase)
rescue LoadError
rescue NameError

return handler if Rackup::Handler.get(handler.to_s.downcase)
rescue LoadError, NameError
# Ignored
end
fail "Server handler (#{Handlers.join(', ')}) not found."
end
Expand Down

0 comments on commit ba1af83

Please sign in to comment.