You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by bu...@apache.org on 2005/03/15 06:19:13 UTC
DO NOT REPLY [Bug 32886] -
client webdav lib doesn't return child collections using listwebdavresources
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=32886>.
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=32886
------- Additional Comments From philipmaciver@yahoo.co.uk 2005-03-15 06:19 -------
(In reply to comment #6)
> I think I had reported this too. I traced this down to the following:
>
> In WebdavResource, line 1086: URIUtil.getName(href) is used to get the name of
> the item; however as per the javadocs this method returns an empty string if
> href ends with a slash. At least with subversion, all hrefs to collections are
> reported as ending with a slash; therefore no sub-collections are ever reported
> by the WebdavResource.listWebdavResources() or associated methods.
>
> My fix: replace URIUtil.getName(href) with WebdavResource.getName(href) this
> seems to work fine for me; although as I said I am not sure what, if any,
> implications this might have on other functionality.
Thanks for this suggestion. I too looked into the source code and found this to
be the problem. But the solution I used was to add the following lines
href = href.endsWith("/") ? href.substring(0,href.length() - 1) : href;
href=href.replaceAll("\\[","%5B");
href=href.replaceAll("\\]","%5D");
href=href.replaceAll("\\|","%7C");
href=href.replaceAll("\\^","%5E");
href=href.replaceAll("\\`","%60");
This I found to work perfectly. And the reason for the replaces statments is to
encode all special charaters that the exchange server might return. I suppose
that this would be better done with the URLEncoder.
This seems to be a long standing issue and because the fix is so simple I do not
know why it has not been implemented yet.
I will be using my modified class until the changes are implemented in the
official source code.
--
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: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org