You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by js...@apache.org on 2008/03/03 19:05:09 UTC

svn commit: r633213 - /incubator/tuscany/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/binding/feed/provider/FeedBindingListenerServlet.java

Author: jsdelfino
Date: Mon Mar  3 10:05:08 2008
New Revision: 633213

URL: http://svn.apache.org/viewvc?rev=633213&view=rev
Log:
use request uri instead of request path and decode encoded characters in the uri.

Modified:
    incubator/tuscany/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/binding/feed/provider/FeedBindingListenerServlet.java

Modified: incubator/tuscany/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/binding/feed/provider/FeedBindingListenerServlet.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/binding/feed/provider/FeedBindingListenerServlet.java?rev=633213&r1=633212&r2=633213&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/binding/feed/provider/FeedBindingListenerServlet.java (original)
+++ incubator/tuscany/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/binding/feed/provider/FeedBindingListenerServlet.java Mon Mar  3 10:05:08 2008
@@ -22,6 +22,7 @@
 import java.io.OutputStreamWriter;
 import java.io.UnsupportedEncodingException;
 import java.io.Writer;
+import java.net.URLDecoder;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
@@ -151,7 +152,7 @@
         // No authentication required for a get request
 
         // Get the request path
-        String path = request.getPathInfo();
+        String path = URLDecoder.decode(request.getRequestURI().substring(request.getServletPath().length()), "UTF-8");
 
         // The feedType parameter is used to override what type of feed is going
         // to be produced
@@ -502,7 +503,7 @@
         }
 
         // Get the request path
-        String path = request.getPathInfo();
+        String path = URLDecoder.decode(request.getRequestURI().substring(request.getServletPath().length()), "UTF-8");
 
         if (path == null || path.length() == 0 || path.equals("/")) {
             Entry createdFeedEntry = null;
@@ -612,7 +613,7 @@
         }
 
         // Get the request path
-        String path = request.getPathInfo();
+        String path = URLDecoder.decode(request.getRequestURI().substring(request.getServletPath().length()), "UTF-8");
 
         if (path != null && path.startsWith("/")) {
             String id = path.substring(1);
@@ -699,7 +700,7 @@
         }
 
         // Get the request path
-        String path = request.getPathInfo();
+        String path = URLDecoder.decode(request.getRequestURI().substring(request.getServletPath().length()), "UTF-8");
 
         String id;
         if (path != null && path.startsWith("/")) {



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org