DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=43593>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=43593 Summary: propFind method incorrectly parses namespaced string property names Product: Slide Version: Nightly Platform: Macintosh OS/Version: Mac OS X 10.4 Status: NEW Severity: normal Priority: P2 Component: WebDAV client AssignedTo: slide-dev@jakarta.apache.org ReportedBy: [EMAIL PROTECTED] When WebdavResource.propfindMethod( String ) is called with a namespaced property such as 'http://example.com/ns:customproperty', incorrect XML is sent over the wire (note the extra colon at the end of the namespace): <D:propfind xmlns:D="DAV:"> <D:prop> <ZZ:customproperty xmlns:ZZ="http://example.com/ns:"> </ZZ:customproperty> </D:prop> </D:propfind> Passing the property in as a Vector containing a PropertyName, the correct XML is sent over the wire. It seems like there is an off-by-one error in PropFindMethod.setPropertyNames(Enumeration): Index: clientlib/src/java/org/apache/webdav/lib/methods/PropFindMethod.java =================================================================== --- clientlib/src/java/org/apache/webdav/lib/methods/PropFindMethod.java (revision 583601) +++ clientlib/src/java/org/apache/webdav/lib/methods/PropFindMethod.java (working copy) @@ -284,7 +284,7 @@ if ((i == 1) || (i >= length)) { list.add(new PropertyName("DAV:",propertyName)); } else { - String namespace = propertyName.substring(0, length + 1 - i); + String namespace = propertyName.substring(0, length - i); String localName = propertyName.substring(length + 1 - i); list.add(new PropertyName(namespace,localName)); } This patch seems to fix the issue, although it seems like this bit of code is meant to deal nicely with multi-byte characters? -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]