ib 2003/11/02 15:44:20
Modified: src/webdav/client/src/org/apache/webdav/lib/properties
AclProperty.java
Log:
Use URIUtil from Commons Httpclient for decoding principal href, so that
'+' characters in URIs that represent groups are not converted to ' '.
Revision Changes Path
1.11 +14 -8
jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/properties/AclProperty.java
Index: AclProperty.java
===================================================================
RCS file:
/home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/properties/AclProperty.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- AclProperty.java 17 Dec 2002 10:31:31 -0000 1.10
+++ AclProperty.java 2 Nov 2003 23:44:20 -0000 1.11
@@ -65,7 +65,8 @@
import java.util.ArrayList;
import org.apache.util.DOMUtils;
-import org.apache.util.URLUtil;
+import org.apache.commons.httpclient.URIException;
+import org.apache.commons.httpclient.util.URIUtil;
import org.apache.webdav.lib.Ace;
import org.apache.webdav.lib.BaseProperty;
import org.apache.webdav.lib.Privilege;
@@ -151,9 +152,14 @@
}
Element href = DOMUtils.getFirstElement(child, "DAV:", "href");
- if (href!=null)
- {
- principal = URLUtil.URLDecode(DOMUtils.getTextValue(href));
+ if (href != null) {
+ principal = DOMUtils.getTextValue(href);
+ try {
+ principal = URIUtil.decode(principal);
+ } catch (URIException e) {
+ System.err.println("Warning: decoding href element failed!");
+ System.err.println("reason: " + e.getReason());
+ }
}
String[] types={"all","authenticated","unauthenticated","property","self"};
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]