diff options
author | Valerij Fredriksen <valerijf@verizonmedia.com> | 2019-10-29 12:50:32 +0100 |
---|---|---|
committer | Valerij Fredriksen <valerijf@verizonmedia.com> | 2019-10-29 12:50:32 +0100 |
commit | 45639aa88c270995c584a50dd39e57d0fba97ca0 (patch) | |
tree | d80ae5e7e506b23154cc951f0c73698beb378b02 /configserver | |
parent | 789e5f4457115a3e7326edfdcba0794562eb0e7f (diff) |
Fix content path
Diffstat (limited to 'configserver')
2 files changed, 2 insertions, 10 deletions
diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/http/v2/ApplicationContentRequest.java b/configserver/src/main/java/com/yahoo/vespa/config/server/http/v2/ApplicationContentRequest.java index 360906a61db..af3ab0b1b83 100644 --- a/configserver/src/main/java/com/yahoo/vespa/config/server/http/v2/ApplicationContentRequest.java +++ b/configserver/src/main/java/com/yahoo/vespa/config/server/http/v2/ApplicationContentRequest.java @@ -2,12 +2,10 @@ package com.yahoo.vespa.config.server.http.v2; import com.yahoo.config.application.api.ApplicationFile; +import com.yahoo.config.provision.ApplicationId; import com.yahoo.config.provision.Zone; import com.yahoo.container.jdisc.HttpRequest; -import com.yahoo.jdisc.application.BindingMatch; -import com.yahoo.config.provision.ApplicationId; import com.yahoo.vespa.config.server.http.ContentRequest; -import com.yahoo.vespa.config.server.http.Utils; /** * Represents a content request for an application. @@ -17,7 +15,6 @@ import com.yahoo.vespa.config.server.http.Utils; */ public class ApplicationContentRequest extends ContentRequest { - private static final String uriPattern = "http://*/application/v2/tenant/*/application/*/environment/*/region/*/instance/*/content/*"; private final ApplicationId applicationId; private final Zone zone; @@ -32,11 +29,6 @@ public class ApplicationContentRequest extends ContentRequest { this.zone = zone; } - static String getContentPath(HttpRequest request) { - BindingMatch<?> bm = Utils.getBindingMatch(request, uriPattern); - return bm.group(7); - } - @Override public String getPathPrefix() { StringBuilder sb = new StringBuilder(); 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 68c54b87fba..6e66495708b 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 @@ -94,7 +94,7 @@ public class ApplicationHandler extends HttpHandler { if (isContentRequest(request)) { long sessionId = applicationRepository.getSessionIdForApplication(applicationId); - String contentPath = ApplicationContentRequest.getContentPath(request); + String contentPath = getBindingMatch(request).group(7); ApplicationFile applicationFile = applicationRepository.getApplicationFileFromSession(applicationId.tenant(), sessionId, |