[jbpm-commits] JBoss JBPM SVN: r2903 - projects/gwt-console/trunk/war/src/main/java/jmaki/xhp.

do-not-reply at jboss.org do-not-reply at jboss.org
Thu Nov 13 06:46:07 EST 2008


Author: heiko.braun at jboss.com
Date: 2008-11-13 06:46:06 -0500 (Thu, 13 Nov 2008)
New Revision: 2903

Modified:
   projects/gwt-console/trunk/war/src/main/java/jmaki/xhp/XmlHttpProxyServlet.java
Log:
Use url encoding when proxy is set to 'passthrough'

Modified: projects/gwt-console/trunk/war/src/main/java/jmaki/xhp/XmlHttpProxyServlet.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/jmaki/xhp/XmlHttpProxyServlet.java	2008-11-13 11:37:07 UTC (rev 2902)
+++ projects/gwt-console/trunk/war/src/main/java/jmaki/xhp/XmlHttpProxyServlet.java	2008-11-13 11:46:06 UTC (rev 2903)
@@ -8,6 +8,7 @@
 import java.util.*;
 import java.net.URL;
 import java.net.URLConnection;
+import java.net.URLEncoder;
 import java.util.logging.*;
 
 import javax.servlet.*;
@@ -282,11 +283,22 @@
 
                if(passthrough)
                {
+                  StringBuffer sb = new StringBuffer();
+                  sb.append(serviceURL);
+
                   // override service url and url params
                   String path = req.getPathInfo();
                   path = path.substring(path.indexOf("xhp/")+3, path.length());
 
-                  urlString = serviceURL + path + "?" + req.getQueryString();
+                  StringTokenizer tok = new StringTokenizer(path, "/");
+                  while(tok.hasMoreTokens())
+                  {
+                     sb.append("/").append(URLEncoder.encode(tok.nextToken()));      
+                  }
+
+                  sb.append("?").append(req.getQueryString());
+
+                  urlString = sb.toString();
                }
             }
             else




More information about the jbpm-commits mailing list