Found another one, this time in the server:

req.getRequestURI() apparently returns the still-encoded string, rather
than a decoded string (this seems strange, but the servlet spec seems
entirely ambiguous on this point to me). Thus, we need to decode it
here, because otherwise it gets screwed up by the later URLEncode() of
this string.

Alternatively, it would be possible to only URLEncode the toAppend
string, and append that to the requestURI. Either works.

Michael

RCS file:
/home/cvspublic/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/PropFindMethod.java,v
retrieving revision 1.7
diff -u -r1.7 PropFindMethod.java
--- PropFindMethod.java 2001/02/15 17:44:01     1.7
+++ PropFindMethod.java 2001/02/18 23:01:44
@@ -80,6 +80,7 @@
 import org.apache.slide.lock.*;
 import org.apache.slide.content.*;
 import javax.xml.parsers.DocumentBuilder;
+import org.apache.util.URLUtil;
 
 /**
  * PROPFIND method.
@@ -427,7 +428,7 @@
                 
                 String path = object.getUri();
                 
-                String absoluteUri = req.getRequestURI();
+                String absoluteUri =
URLUtil.URLDecode(req.getRequestURI());
                 String relativePath = requestUri;
                 String toAppend = "";
                 if (relativePath.length() <= path.length()) {
@@ -453,7 +454,7 @@
                 
                 String path = object.getUri();
                 
-                String absoluteUri = req.getRequestURI();
+                String absoluteUri =
URLUtil.URLDecode(req.getRequestURI());
                 String relativePath = requestUri;
                 String toAppend = "";
                 if (relativePath.length() <= path.length()) {

Reply via email to