Author: chathura
Date: Fri Jan 11 02:55:11 2008
New Revision: 12147
Log:
URL decoded all URLs in web servlet. This fixes the bug in using spaces in
resource/collection names.
Modified:
trunk/registry/modules/webapps/src/main/java/org/wso2/registry/web/ControllerServlet.java
Modified:
trunk/registry/modules/webapps/src/main/java/org/wso2/registry/web/ControllerServlet.java
==============================================================================
---
trunk/registry/modules/webapps/src/main/java/org/wso2/registry/web/ControllerServlet.java
(original)
+++
trunk/registry/modules/webapps/src/main/java/org/wso2/registry/web/ControllerServlet.java
Fri Jan 11 02:55:11 2008
@@ -35,6 +35,8 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
+import java.net.URLEncoder;
+import java.net.URLDecoder;
public class ControllerServlet extends HttpServlet {
@@ -401,7 +403,8 @@
protected void doGet(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException {
- String uri = request.getRequestURI();
+ String uri = URLDecoder.decode(request.getRequestURI(), "UTF-8");
+
// if a path is not set in the session, set the path to the root
String path = (String)
request.getSession().getAttribute(UIConstants.PATH_ATTR);
if (path == null || path.length() == 0) {
_______________________________________________
Registry-dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/registry-dev