Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ protected HttpClient newHttpClient() {

if (config.isTlsEnabledWithBroker()) {
try {
X509Certificate trustCertificates[] = SecurityUtility
X509Certificate[] trustCertificates = SecurityUtility
.loadCertificatesFromPemFile(config.getBrokerClientTrustCertsFilePath());

SSLContext sslCtx;
Expand All @@ -281,6 +281,7 @@ protected HttpClient newHttpClient() {

return new JettyHttpClient(contextFactory);
} catch (Exception e) {
LOG.error("new jetty http client exception ", e);
try {
auth.close();
} catch (IOException ioe) {
Expand All @@ -303,7 +304,7 @@ protected String rewriteTarget(HttpServletRequest request) {

boolean isFunctionsRestRequest = false;
String requestUri = request.getRequestURI();
for (String routePrefix: functionRoutes) {
for (String routePrefix : functionRoutes) {
if (requestUri.startsWith(routePrefix)) {
isFunctionsRestRequest = true;
break;
Expand All @@ -324,7 +325,7 @@ protected String rewriteTarget(HttpServletRequest request) {

if (LOG.isDebugEnabled()) {
LOG.debug("[{}:{}] Selected active broker is {}", request.getRemoteAddr(), request.getRemotePort(),
url.toString());
url);
}
} catch (Exception e) {
LOG.warn("[{}:{}] Failed to get next active broker {}", request.getRemoteAddr(),
Expand Down