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 <rn...@redhat.com>
---
M 
backend/manager/modules/uutils/src/main/java/org/ovirt/engine/core/uutils/servlet/ProxyServletBase.java
1 file changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/02/33202/1

diff --git 
a/backend/manager/modules/uutils/src/main/java/org/ovirt/engine/core/uutils/servlet/ProxyServletBase.java
 
b/backend/manager/modules/uutils/src/main/java/org/ovirt/engine/core/uutils/servlet/ProxyServletBase.java
index e2e48be..16a9710 100644
--- 
a/backend/manager/modules/uutils/src/main/java/org/ovirt/engine/core/uutils/servlet/ProxyServletBase.java
+++ 
b/backend/manager/modules/uutils/src/main/java/org/ovirt/engine/core/uutils/servlet/ProxyServletBase.java
@@ -28,6 +28,8 @@
 public class ProxyServletBase extends HttpServlet {
 
     private static final long serialVersionUID = 5331291232426186121L;
+    private static final String HTTP = "http://";;
+    private static final String HTTPS = "http://";;
 
     private Boolean verifyHost = true;
     private Boolean verifyChain = true;
@@ -184,7 +186,7 @@
     protected void doGet(HttpServletRequest request, HttpServletResponse 
response)
     throws ServletException, IOException {
 
-        if (url == null) {
+        if (url == null || (!url.startsWith(HTTP) && !url.startsWith(HTTPS))) {
             response.sendError(response.SC_NOT_FOUND, "Cannot proxy, no URL is 
configured.");
         } else {
             URLConnection connection;


-- 
To view, visit http://gerrit.ovirt.org/33202
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I485dff572fe8ce1ffb61d77b5032b540735f93f2
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Ravi Nori <rn...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to