X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=engine-d%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fholmes%2Fengine%2Fresources%2FDmaapConfigurationService.java;h=548b9b297030f46729f7b4312f1c40814d2d6e33;hb=5b3f8b279725c337de6988e703cca418b3e53826;hp=99567b884f5bc53e70592eb00324780611506795;hpb=3b822dd0c43d656cf4cb9b3f37633300b963e120;p=holmes%2Fengine-management.git diff --git a/engine-d/src/main/java/org/onap/holmes/engine/resources/DmaapConfigurationService.java b/engine-d/src/main/java/org/onap/holmes/engine/resources/DmaapConfigurationService.java index 99567b8..548b9b2 100644 --- a/engine-d/src/main/java/org/onap/holmes/engine/resources/DmaapConfigurationService.java +++ b/engine-d/src/main/java/org/onap/holmes/engine/resources/DmaapConfigurationService.java @@ -50,7 +50,7 @@ public class DmaapConfigurationService { + " and url. Both fields are required.") DmaapConfigRequest config, @Context HttpServletRequest request){ String url = config.getUrl(); - if (url.startsWith("http://")) { + if (url.startsWith("http://") || url.startsWith("https://")) { Subscriber subscriber = new Subscriber(); subscriber.setTopic(config.getName()); subscriber.setUrl(url); @@ -64,7 +64,7 @@ public class DmaapConfigurationService { return "{\"message\": \"Succeeded!\", \"topic\": \"" + config.getName() + "\"}"; } - return "{\"message\": \"Only the HTTP protocol is supported!\"}"; + return "{\"message\": \"Only the HTTP or HTTPS protocol is supported!\"}"; } @DELETE @@ -92,7 +92,7 @@ public class DmaapConfigurationService { + " and url. Both fields are required.") DmaapConfigRequest config, @Context HttpServletRequest request){ String url = config.getUrl(); - if (url.startsWith("http://")) { + if (url.startsWith("http://") || url.startsWith("https://")) { SecurityInfo securityInfo = new SecurityInfo(); SecurityInfo.DmaapInfo dmaapInfo = new SecurityInfo().new DmaapInfo(); dmaapInfo.setTopicUrl(config.getUrl()); @@ -100,6 +100,6 @@ public class DmaapConfigurationService { DcaeConfigurationsCache.addPubSecInfo(config.getName(), securityInfo); return "{\"message\": \"Succeeded!\", \"topic\": \"" + config.getName() + "\"}"; } - return "{\"message\": \"Only the HTTP protocol is supported!\"}"; + return "{\"message\": \"Only the HTTP or HTTPS protocol is supported!\"}"; } }