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

WebdavResource does not authenticate to child resources

           Summary: WebdavResource does not authenticate to child resources
           Product: Slide
           Version: 2.0
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: WebDAV client
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


Using an Apache 2.0.40 with mod_dav as server requiring basic authentication, I had 
trouble 
getting the child resources even of the toplevel collection. With webdav directory 
contents 
 
/folder/ 
/folder/first/ 
 
I got a 401 for the /folder/first/ while /folder/ was correctly read. 
 
I could fix that for me by fetching the Userinfo from the current resource when 
building the 
URL of the child resource: 
 
Class: org.apache.webdav.lib.WebdavResource 
 
    protected void setWebdavProperties(Enumeration responses) 
        throws HttpException, IOException { 
            ... 
            if (!itself) { 
                String myURI = httpURL.getEscapedURI(); 
                // (mz) FIX 
                HttpURL huNewHttpURL = (httpURL instanceof HttpsURL) 
                    ? new HttpsURL(myURI + (myURI.endsWith("/") ? "" : "/") 
                                   + URIUtil.encodePath(displayName)) 
                    : new HttpURL(myURI + (myURI.endsWith("/") ? "" : "/") 
                                  + URIUtil.encodePath(displayName)); 
                String sUser = httpURL.getUser(); 
                String sPassword = httpURL.getPassword(); 
                if (sUser!=null) { 
                    huNewHttpURL.setUserinfo(sUser, sPassword); 
                } 
                workingResource.setHttpURL(huNewHttpURL, NOACTION, defaultDepth); 
                ... 
        } 
 
In the current 2.0rc3, this setting of the Userinfo is not done.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to