diff options
| author | syeopite <70992037+syeopite@users.noreply.github.com> | 2024-11-10 05:45:06 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-10 05:45:06 +0000 |
| commit | 7a15318fbcc44d7f7b2f5795023fcc36b5e122a3 (patch) | |
| tree | 5282def96968c3d6729296a343800b8971439e41 /src | |
| parent | b173d4acf21563d47d26718eca7932878fb424e6 (diff) | |
| download | invidious-7a15318fbcc44d7f7b2f5795023fcc36b5e122a3.tar.gz invidious-7a15318fbcc44d7f7b2f5795023fcc36b5e122a3.tar.bz2 invidious-7a15318fbcc44d7f7b2f5795023fcc36b5e122a3.zip | |
Skip route if resp got closed by before handlers
Diffstat (limited to 'src')
| -rw-r--r-- | src/invidious/helpers/handlers.cr | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/invidious/helpers/handlers.cr b/src/invidious/helpers/handlers.cr index f3e3b951..13ea9fe9 100644 --- a/src/invidious/helpers/handlers.cr +++ b/src/invidious/helpers/handlers.cr @@ -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) |
