Ravi Nori has uploaded a new change for review. Change subject: core : JBoss Servlet Exception at Page Loads :: no protocol: /ovirt/reports-interface ......................................................................
core : JBoss Servlet Exception at Page Loads :: no protocol: /ovirt/reports-interface When reports server is not installed and the reports base url is empty the redirect url does not have a protocal associated with it. So the url "/ovirt/reports-interface" throws an exception in server logs Change-Id: I485dff572fe8ce1ffb61d77b5032b540735f93f2 Bug-Url: https://bugzilla.redhat.com/1142748 Signed-off-by: Ravi Nori <[email protected]> --- M backend/manager/modules/services/src/main/java/org/ovirt/engine/core/services/ProxyServlet.java 1 file changed, 11 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/37/33537/1 diff --git a/backend/manager/modules/services/src/main/java/org/ovirt/engine/core/services/ProxyServlet.java b/backend/manager/modules/services/src/main/java/org/ovirt/engine/core/services/ProxyServlet.java index 90c7ca9..02fbfe7 100644 --- a/backend/manager/modules/services/src/main/java/org/ovirt/engine/core/services/ProxyServlet.java +++ b/backend/manager/modules/services/src/main/java/org/ovirt/engine/core/services/ProxyServlet.java @@ -19,6 +19,8 @@ private static final String TRUST_STORE_PASSWORD_PRM = "trustStorePassword"; private static final String READ_TIMEOUT_PRM = "readTimeout"; private static final String URL_PRM = "url"; + private static final String HTTP = "http://"; + private static final String HTTPS = "https://"; private String getConfigString(String name) { String r = getServletConfig().getInitParameter(name); @@ -49,6 +51,14 @@ return r; } + private String getUrl() { + String url = getConfigString(URL_PRM); + if (!url.startsWith(HTTP) && !url.startsWith(HTTPS)) { + url = null; + } + return url; + } + @Override public void init() throws ServletException { setVerifyHost(getConfigBoolean(VERIFY_HOST_PRM)); @@ -59,7 +69,7 @@ setTrustStoreType(getConfigString(TRUST_STORE_TYPE_PRM)); setTrustStorePassword(getConfigString(TRUST_STORE_PASSWORD_PRM)); setReadTimeout(getConfigInteger(READ_TIMEOUT_PRM)); - setUrl(getConfigString(URL_PRM)); + setUrl(getUrl()); } } -- To view, visit http://gerrit.ovirt.org/33537 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I485dff572fe8ce1ffb61d77b5032b540735f93f2 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: ovirt-engine-3.5 Gerrit-Owner: Ravi Nori <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
