list(url) works fine, list(url,depth) returns 400

22 views
Skip to first unread message

Tracy Nelson

unread,
Jun 30, 2016, 10:40:15 AM6/30/16
to sardine
Like the title says, I'm getting a 400 error when I attempt to specify a depth when invoking list().  My code's pretty dead simple, it basically looks like this:

Sardine webDavClient = SardineFactory.begin();
try {
       
String connectionString = "http://192.168.10.14/content/";
        List<DavResource> files = webDavClient.list(connectionString,3);
        LOG.debug(">>> Got {} files", files.size());
        for(DavResource rsc : files) {
           
LOG.debug("{} / {} bytes / {}", rsc.getName(), rsc.getContentLength(), rsc.getModified());
        }
       
LOG.debug(">>> ---");
} catch (InterruptedException e) {
   
LOG.warn("Interrupted while collecting inventory for 192.168.10.14");
} catch (IOException e) {
    e
.printStackTrace();
} finally {
   
if(webDavClient != null) {
       
try {
            webDavClient
.shutdown();
        } catch (IOException ioErr) {
           
// Catch and release
        }
   
}
}

Anything obviously stupid I'm doing? Like I said, it works fine if I don't specify a depth (modulo the fact that I don't get the contents of any sub-directories).
Reply all
Reply to author
Forward
0 new messages