diff options
author | Valerij Fredriksen <valerijf@verizonmedia.com> | 2019-11-05 11:45:22 +0100 |
---|---|---|
committer | Valerij Fredriksen <valerijf@verizonmedia.com> | 2019-11-05 11:45:22 +0100 |
commit | 064617cc068b4e79ded236c659495d342d6707ca (patch) | |
tree | 2d2c6035ce19f0c661ceb98a6ef8c41882f93952 /configserver | |
parent | a0aa29e8c4fa396eba20612a2cea75ac3720f93e (diff) |
Remove unused binding
Diffstat (limited to 'configserver')
2 files changed, 3 insertions, 4 deletions
diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/http/v2/ApplicationHandler.java b/configserver/src/main/java/com/yahoo/vespa/config/server/http/v2/ApplicationHandler.java index 6e66495708b..1e80ef2d883 100644 --- a/configserver/src/main/java/com/yahoo/vespa/config/server/http/v2/ApplicationHandler.java +++ b/configserver/src/main/java/com/yahoo/vespa/config/server/http/v2/ApplicationHandler.java @@ -47,7 +47,6 @@ public class ApplicationHandler extends HttpHandler { "http://*/application/v2/tenant/*/application/*/environment/*/region/*/instance/*/metrics", "http://*/application/v2/tenant/*/application/*/environment/*/region/*/instance/*/logs", "http://*/application/v2/tenant/*/application/*/environment/*/region/*/instance/*", - "http://*/application/v2/tenant/*/application/*/logs", // TODO: Remove once all clients switched to handler with instance name "http://*/application/v2/tenant/*/application/*") .map(UriPattern::new) .collect(Collectors.toList()); @@ -181,8 +180,8 @@ public class ApplicationHandler extends HttpHandler { } private static boolean isLogRequest(HttpRequest request) { - return request.getUri().getPath().endsWith("/logs") && - (getBindingMatch(request).groupCount() == 4 || getBindingMatch(request).groupCount() == 7); + return getBindingMatch(request).groupCount() == 7 && + request.getUri().getPath().endsWith("/logs"); } private static boolean isServiceConvergeListRequest(HttpRequest request) { diff --git a/configserver/src/test/java/com/yahoo/vespa/config/server/http/v2/ApplicationHandlerTest.java b/configserver/src/test/java/com/yahoo/vespa/config/server/http/v2/ApplicationHandlerTest.java index da576c88b52..0acce9ed2c7 100644 --- a/configserver/src/test/java/com/yahoo/vespa/config/server/http/v2/ApplicationHandlerTest.java +++ b/configserver/src/test/java/com/yahoo/vespa/config/server/http/v2/ApplicationHandlerTest.java @@ -211,7 +211,7 @@ public class ApplicationHandlerTest { stubFor(get(urlEqualTo(path)) .willReturn(aResponse() .withStatus(200))); - String url = toUrlPath(applicationId, Zone.defaultZone(), false) + path; + String url = toUrlPath(applicationId, Zone.defaultZone(), true) + path; ApplicationHandler mockHandler = createApplicationHandler(); HttpResponse response = mockHandler.handle(HttpRequest.createTestRequest(url, com.yahoo.jdisc.http.HttpRequest.Method.GET)); assertEquals(200, response.getStatus()); |