From c63a3402b0054642bfe07465278dc80246b0321b Mon Sep 17 00:00:00 2001 From: Tal Gitelman Date: Sun, 5 Aug 2018 17:16:15 +0300 Subject: Updating the Jetty version Change-Id: Id492fab0745479556a6c63af5aec32a49765cb67 Issue-ID: SDC-1545 Signed-off-by: Tal Gitelman --- .../org/openecomp/sdc/be/monitoring/EsGateway.java | 24 ++++------------------ 1 file changed, 4 insertions(+), 20 deletions(-) (limited to 'catalog-be/src/main/java/org') diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/monitoring/EsGateway.java b/catalog-be/src/main/java/org/openecomp/sdc/be/monitoring/EsGateway.java index 5f3fd10eb1..fed36b5653 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/monitoring/EsGateway.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/monitoring/EsGateway.java @@ -7,9 +7,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -20,8 +20,6 @@ package org.openecomp.sdc.be.monitoring; -import org.eclipse.jetty.client.api.Request; -import org.eclipse.jetty.client.api.Response; import org.eclipse.jetty.proxy.ProxyServlet; import org.openecomp.sdc.be.components.impl.MonitoringBusinessLogic; import org.openecomp.sdc.be.impl.WebAppContextWrapper; @@ -31,8 +29,6 @@ import org.springframework.web.context.WebApplicationContext; import javax.servlet.ServletContext; import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.net.URI; public class EsGateway extends ProxyServlet { @@ -40,25 +36,13 @@ public class EsGateway extends ProxyServlet { private static final Logger log = Logger.getLogger(EsGateway.class); @Override - public URI rewriteURI(HttpServletRequest request) { + public String rewriteTarget(HttpServletRequest request) { String originalUrl = request.getRequestURI(); - String redirectedUrl = getModifiedUrl(request); log.debug("EsGateway Redirecting request from: {} , to: {}", originalUrl, redirectedUrl); - return URI.create(redirectedUrl); - } - - @Override - public void customizeProxyRequest(Request proxyRequest, HttpServletRequest request) { - super.customizeProxyRequest(proxyRequest, request); - - } - - @Override - protected void onResponseSuccess(HttpServletRequest request, HttpServletResponse response, Response proxyResponse) { - super.onResponseSuccess(request, response, proxyResponse); + return redirectedUrl; } public String getModifiedUrl(HttpServletRequest request) { -- cgit 1.2.3-korg