The url of http server via msb is started with 'files/catalog-http'.
authorYuanHu <yuan.hu1@zte.com.cn>
Thu, 13 Oct 2016 07:16:05 +0000 (15:16 +0800)
committerhuangjian <huang.jian12@zte.com.cn>
Mon, 17 Oct 2016 12:28:58 +0000 (20:28 +0800)
Change-Id: Ifdd6a3283d5ed95a70903703a59eab5036c7fbd9
Issue-id: TOSCA-108
Signed-off-by: YuanHu <yuan.hu1@zte.com.cn>
catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/parser/AbstractModelParser.java

index f963d7b..09c3e12 100644 (file)
@@ -55,7 +55,11 @@ public abstract class AbstractModelParser {
   }
   
   public String getUrlOnHttpServer(String path) {
-    return MsbAddrConfig.getMsbAddress() + "/" + path;
+    if (MsbAddrConfig.getMsbAddress().endsWith("/")) {
+      return MsbAddrConfig.getMsbAddress() + "files/catalog-http" + path;
+    } else {
+      return MsbAddrConfig.getMsbAddress() + "/files/catalog-http" + path;
+    }
   }
   
   protected String toTempFilePath(String fileLocation) {