diff --git a/wsclient/src/main/java/org/hpccsystems/ws/client/BaseHPCCWsClient.java b/wsclient/src/main/java/org/hpccsystems/ws/client/BaseHPCCWsClient.java index 0dfe94b5e..2ee1461a9 100644 --- a/wsclient/src/main/java/org/hpccsystems/ws/client/BaseHPCCWsClient.java +++ b/wsclient/src/main/java/org/hpccsystems/ws/client/BaseHPCCWsClient.java @@ -1,6 +1,7 @@ package org.hpccsystems.ws.client; import java.io.ByteArrayInputStream; +import java.io.IOException; import java.net.MalformedURLException; import java.net.URL; import java.nio.charset.StandardCharsets; @@ -159,24 +160,44 @@ private String getTargetHPCCBuildVersionString() throws Exception if (wsconn == null) throw new Exception("Cannot get target HPCC build version, client connection has not been initialized."); - String response = wsconn.sendGetRequest("WsSMC/Activity?rawxml_");//throws + String response = wsconn.sendGetRequest("WsSMC/Activity?rawxml_");//throws IOException if http != ok if (response == null || response.isEmpty()) throw new Exception("Cannot get target HPCC build version, received empty " + wsconn.getBaseUrl() + " wssmc/activity response"); + String header = response.substring(0, 100).trim(); //crude, but can prevent wasteful overhead + if (header.startsWith("