commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Hausladen <>
Subject Re: [vfs] (trunk) webdav auth challenges not provided credentials
Date Wed, 08 Sep 2010 16:20:20 GMT
Should anyone hit this post and be facing the same problem, I'll point out what 
I found out to be the solution.  I needed to use the 
DefaultFileSystemManager.resolveFile(FileObject, String, FileSystemOptions) 
method instead, which tunnels the options into the FileSystem.  Otherwise, 
you're out of luck.  While it seems like the interface prohibits use by the 
presence of the FileObject in the signature, you can leave it null and provide a 
URI string in the second parameter and provide the FileSystemOptions which have 
been decorated with authentication information in the third.

I'm also going to be sending some patches for some problems I encountered while 
working with vfs.
1. The default authentication approach seemed wasteful/inefficient enough to 
call it a defect IMO.  Expose a "preemptive" authentication option via 

2. I found some NullPointerExceptions in the handling of the WebDAV properties.  

I'll send the links to the issues once created.

From: David Hausladen <>
To: Commons Users List <>
Sent: Tue, September 7, 2010 1:00:59 PM
Subject: Re: [vfs] (trunk) webdav auth challenges not provided credentials

I've been debugging it and it looks like the FileSystemOptions containing the 
auth information aren't the same ones used to create the filesystem or look up 
properties of a FileObject.  Is there any way to ensure that the instance of 
FileSystemOptions one sets up using the *FileSystemConfigBuilders is the one 
actually used by the file system operations?

----- Original Message ----
From: dhauslad <>
Sent: Thu, September 2, 2010 8:52:01 PM
Subject: [VFS] (trunk) webdav auth challenges not provided credentials

As long as the URI/path provided to the resolveFile-like methods contains the
user id and password, I've been successful getting stuff from webdav via the
VFS APIs.  However, as soon as I start using some of the other methods on a
returned FileObject (for example: getContent().getAttributes()), I see this
kind of error in my log.

02 Sep 2010 15:43:25.937 DEBUG  << "HTTP/1.1 401 Unauthorized[\r][\n]"

I've tried setting up the UserAuthenticator on the
DefaultFileSystemConfigBuilder and the proxy authentication on the
WebdavFileSystemConfigBuilder to no avail.  Where should I be supplying the
authentication information? 
View this message in context:

Sent from the Commons - User mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message