Author: jsdelfino
Date: Mon Mar  3 10:04:03 2008
New Revision: 633212

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

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

Modified: 
incubator/tuscany/java/sca/modules/binding-http/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPGetListenerServlet.java
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-http/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPGetListenerServlet.java?rev=633212&r1=633211&r2=633212&view=diff
==============================================================================
--- 
incubator/tuscany/java/sca/modules/binding-http/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPGetListenerServlet.java
 (original)
+++ 
incubator/tuscany/java/sca/modules/binding-http/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPGetListenerServlet.java
 Mon Mar  3 10:04:03 2008
@@ -22,6 +22,7 @@
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
+import java.net.URLDecoder;
 
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServlet;
@@ -56,8 +57,8 @@
     protected void doGet(HttpServletRequest request, HttpServletResponse 
response) throws ServletException, IOException {
 
         // Get the request path
-        String path = request.getPathInfo();
-        if (path == null) {
+        String path = 
URLDecoder.decode(request.getRequestURI().substring(request.getServletPath().length()),
 "UTF-8");
+        if (path.length() ==0) {
             
             // Redirect to a URL ending with / to make relative hrefs work
             // relative to the served resource.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to