mirror of
https://github.com/iv-org/invidious.git
synced 2025-01-29 22:39:59 +01:00
Kemal: Skip route if response was closed by handlers (#5073)
This commit is contained in:
commit
dc38bcdf17
1 changed files with 1 additions and 0 deletions
|
@ -27,6 +27,7 @@ class Kemal::RouteHandler
|
|||
# Processes the route if it's a match. Otherwise renders 404.
|
||||
private def process_request(context)
|
||||
raise Kemal::Exceptions::RouteNotFound.new(context) unless context.route_found?
|
||||
return if context.response.closed?
|
||||
content = context.route.handler.call(context)
|
||||
|
||||
if !Kemal.config.error_handlers.empty? && Kemal.config.error_handlers.has_key?(context.response.status_code) && exclude_match?(context)
|
||||
|
|
Loading…
Add table
Reference in a new issue