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=41977>.
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=41977

           Summary: Trailing slash in directory listings causes trouble for
                    client library
           Product: Slide
           Version: 2.1
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: WebDAV client
        AssignedTo: slide-dev@jakarta.apache.org
        ReportedBy: [EMAIL PROTECTED]


The Stellent repository returns results from directory listings (PROPFIND
requests) where subdirectory hrefs end in trailing slashes.  For example:

<d:response>
    <d:href>/stellent/idcplg/webdav/Contribution%20Folders/Myfolder/</d:href>
    ...
</d:response>

This causes the client library in release 2.1 to get confused.  Specifically,
WebdavResource.java, around line 1075, includes the following code:

                String myURI = httpURL.getEscapedURI();
                char[] childURI = (myURI + (myURI.endsWith("/") ? "" : "/")
                                   + URIUtil.getName(href)).toCharArray();
                HttpURL childURL = httpURL instanceof HttpsURL
                                   ? new HttpsURL(childURI)
                                   : new HttpURL(childURI);

The variable 'href' contains the href to the child element.  If this ends in a
slash, then URIUtil.getName(href) returns an empty string.  

This means that the URI that gets calculated for the child element is
(erroneously) the same as the URI for the parent.

-- 
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]

Reply via email to