Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes #1634 do not call the next handler in the chain if any intercep… #1635

Merged
merged 2 commits into from
Mar 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,11 @@ public void handleRequest(HttpServerExchange httpServerExchange) throws Exceptio
// no need to inject the content for the body. just call the interceptors here.
this.invokeInterceptors(httpServerExchange);
}
Handler.next(httpServerExchange, next);
// If there are any error and one of the interceptor response the error to the caller, we don't need to call the next.
if(logger.isTraceEnabled()) logger.trace("Exchange response started status = {}", httpServerExchange.isResponseStarted());
if(!httpServerExchange.isResponseStarted()) {
Handler.next(httpServerExchange, next);
}
}

/**
Expand Down