Vault 5: WebDAV compatibility

If you are having a problem using Vault, post a message here.

Moderator: SourceGear

Post Reply
avonwyss
Posts: 99
Joined: Mon Oct 04, 2004 9:06 am

Vault 5: WebDAV compatibility

Post by avonwyss » Wed Aug 12, 2009 5:15 am

I'm having trouble using Vault 5 with many WebDAV clients (such as WebDrive, Web Folders, etc.). After some debugging, I've seen that Vault sends a BOM, which seems to be unexpected for many clients. Since the response is UTF8 and the encoding is specified in the XML directive, the BOM seems to be unnecessary, as all compliant XML parsers will start with ASCII and switch to UTF8 as soon as the read the XML directive.
VaultWebDAV-BOL.png
VaultWebDAV-BOL.png (88.63 KiB) Viewed 4331 times
Therefore, please remove the BOM from your WebDAV responses. This is easy.

paulroub
Posts: 29
Joined: Mon Nov 19, 2007 2:49 pm
Location: Champaign, IL
Contact:

Re: Vault 5: WebDAV compatibility

Post by paulroub » Wed Aug 12, 2009 7:49 am

Thanks for the input -- we'll take a look at the BOM; hasn't been a problem with our test target clients (Dreamweaver 8, CS3, CS4; Mac OS network folders; cadaver; and the litmus WebDAV test suite).

Microsoft Web Folders will likely never work - since XP SP 1 (if I recall correctly), they're aimed specifically at IIS's extended WebDAV, and not at standard WebDAV servers.

I'll see about testing WebDrive.

-paul
Paul Roub
SourceGear

paulroub
Posts: 29
Joined: Mon Nov 19, 2007 2:49 pm
Location: Champaign, IL
Contact:

Re: Vault 5: WebDAV compatibility

Post by paulroub » Wed Aug 12, 2009 8:51 am

FYI, once I set WebDrive to use Basic Authentication, it was happy with or without the BOMs
Paul Roub
SourceGear

avonwyss
Posts: 99
Joined: Mon Oct 04, 2004 9:06 am

Re: Vault 5: WebDAV compatibility

Post by avonwyss » Wed Aug 12, 2009 9:02 am

Maybe this is specific to the x64 version of WebDrive, I don't know.

paulroub
Posts: 29
Joined: Mon Nov 19, 2007 2:49 pm
Location: Champaign, IL
Contact:

Re: Vault 5: WebDAV compatibility

Post by paulroub » Wed Aug 12, 2009 9:18 am

If so, I'd love to see a trace of the traffic between WebDrive x64 and Vault. (via Wireshark, etc.)

-paul
Paul Roub
SourceGear

avonwyss
Posts: 99
Joined: Mon Oct 04, 2004 9:06 am

Re: Vault 5: WebDAV compatibility

Post by avonwyss » Wed Aug 12, 2009 9:49 am

Sure... here you go:

Code: Select all

OPTIONS /sgdav/wd.ashx/vaultdemo/Main/ HTTP/1.1
Host: vaultdemo.sourcegear.com
User-Agent: WebDrive 9.0.2199 DAV
Translate: f
Content-Length: 0
Connection: Keep-Alive
HTTP/1.1 401 Unauthorized
Date: Wed, 12 Aug 2009 15:35:29 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
WWW-Authenticate: Basic realm="vaultdemo/Main"
Cache-Control: private
Content-Length: 0
OPTIONS /sgdav/wd.ashx/vaultdemo/Main/ HTTP/1.1
Host: vaultdemo.sourcegear.com
User-Agent: WebDrive 9.0.2199 DAV
Translate: f
Authorization: Basic Z3Vlc3QxOmd1ZXN0MQ==
Content-Length: 0
Connection: Keep-Alive
HTTP/1.1 200 OK
Date: Wed, 12 Aug 2009 15:35:30 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
DAV: 1,2
Allow: PROPFIND, LOCK, DELETE, GET, MKCOL, PUT, PROPPATCH, UNLOCK, MOVE, COPY, OPTIONS
Cache-Control: private
Content-Length: 0
PROPFIND /sgdav/wd.ashx/vaultdemo/Main/ HTTP/1.1
Content-Type: text/xml
Depth: 0
Host: vaultdemo.sourcegear.com
User-Agent: WebDrive 9.0.2199 DAV
Translate: f
Authorization: Basic Z3Vlc3QxOmd1ZXN0MQ==
Content-Length: 376
Connection: Keep-Alive
<?xml version="1.0" encoding="utf-8" ?><propfind xmlns="DAV:"  xmlns:srtns="http://www.southrivertech.com/"><prop><creationdate/><getlastmodified/><displayname/><href/><getcontentlength/><resourcetype/><collection/><isreadonly/><lockdiscovery/><srtns:srt_modifiedtime/><srtns:srt_creationtime/><srtns:srt_lastaccesstime/><srtns:srt_proptimestamp/><ishidden/></prop></propfind>HTTP/1.1 207 Multi-Status
Date: Wed, 12 Aug 2009 15:35:30 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Cache-Control: private
Content-Type: text/xml
Content-Length: 580
...<?xml version="1.0" encoding="utf-8"?>
<a:multistatus xmlns:a="DAV:">
  <a:response>
    <a:href>/sgdav/wd.ashx/vaultdemo/Main/</a:href>
    <a:propstat>
      <a:status>HTTP/1.1 200 OK</a:status>
      <a:prop>
        <a:creationdate>2009-08-11T18:50:46Z</a:creationdate>
        <a:getlastmodified>Tue, 11 Aug 2009 18:50:46 GMT</a:getlastmodified>
        <a:resourcetype>
          <a:collection />
        </a:resourcetype>
        <a:getcontenttype>httpd/unix-directory</a:getcontenttype>
      </a:prop>
    </a:propstat>
  </a:response>
</a:multistatus>PROPFIND /sgdav/wd.ashx/vaultdemo/Main/ HTTP/1.1
Content-Type: text/xml
Depth: 0
Host: vaultdemo.sourcegear.com
User-Agent: WebDrive 9.0.2199 DAV
Translate: f
Authorization: Basic Z3Vlc3QxOmd1ZXN0MQ==
Content-Length: 198
Connection: Keep-Alive
<?xml version="1.0" encoding="utf-8" ?><propfind xmlns="DAV:"  xmlns:srtns="http://www.southrivertech.com/"><prop><quota-available-bytes/><quota-used-bytes/><quota-assigned-bytes/></prop></propfind>HTTP/1.1 207 Multi-Status
Date: Wed, 12 Aug 2009 15:37:37 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Cache-Control: private
Content-Type: text/xml
Content-Length: 580
...<?xml version="1.0" encoding="utf-8"?>
<a:multistatus xmlns:a="DAV:">
  <a:response>
    <a:href>/sgdav/wd.ashx/vaultdemo/Main/</a:href>
    <a:propstat>
      <a:status>HTTP/1.1 200 OK</a:status>
      <a:prop>
        <a:creationdate>2009-08-11T18:50:46Z</a:creationdate>
        <a:getlastmodified>Tue, 11 Aug 2009 18:50:46 GMT</a:getlastmodified>
        <a:resourcetype>
          <a:collection />
        </a:resourcetype>
        <a:getcontenttype>httpd/unix-directory</a:getcontenttype>
      </a:prop>
    </a:propstat>
  </a:response>
</a:multistatus>PROPFIND /sgdav/wd.ashx/vaultdemo/Main/ HTTP/1.1
Content-Type: text/xml
Depth: 1
Host: vaultdemo.sourcegear.com
User-Agent: WebDrive 9.0.2199 DAV
Translate: f
Authorization: Basic Z3Vlc3QxOmd1ZXN0MQ==
Content-Length: 425
Connection: Keep-Alive
<?xml version="1.0" encoding="utf-8" ?><propfind xmlns="DAV:"  xmlns:srtns="http://www.southrivertech.com/"><prop><creationdate/><getlastmodified/><getcontentlength/><href/><resourcetype/><locktoken/><lockdiscovery/><collection/><activelock/><isreadonly/><ishidden/><srtns:srt_modifiedtime/><srtns:srt_creationtime/><srtns:srt_lastaccesstime/><srtns:srt_proptimestamp/><BSI_isreadonly/><SRT_fileattributes/></prop></propfind>HTTP/1.1 207 Multi-Status
Date: Wed, 12 Aug 2009 15:37:39 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Cache-Control: private
Content-Type: text/xml
Content-Length: 3356
...<?xml version="1.0" encoding="utf-8"?>
<a:multistatus xmlns:a="DAV:">
  <a:response>
    <a:href>/sgdav/wd.ashx/vaultdemo/Main/</a:href>
    <a:propstat>
      <a:status>HTTP/1.1 200 OK</a:status>
      <a:prop>
        <a:creationdate>2009-08-11T18:50:46Z</a:creationdate>
        <a:getlastmodified>Tue, 11 Aug 2009 18:50:46 GMT</a:getlastmodified>
        <a:resourcetype>
          <a:collection />
        </a:resourcetype>
        <a:getcontenttype>httpd/unix-directory</a:getcontenttype>
      </a:prop>
    </a:propstat>
  </a:response>
  <a:response>
    <a:href>/sgdav/wd.ashx/vaultdemo/Main/.DS_Store</a:href>
    <a:propstat>
      <a:status>HTTP/1.1 200 OK</a:status>
      <a:prop>
        <a:getcontenttype>text/plain</a:getcontenttype>
        <a:getcontentlength>6148</a:getcontentlength>
        <a:getlastmodified>Wed, 05 Aug 2009 15:06:20 GMT</a:getlastmodified>
        <a:creationdate>2009-08-05T15:06:20Z</a:creationdate>
        <a:displayname>.DS_Store</a:displayname>
        <a:supportedlock>
          <a:lockentry>
            <a:lockscope>
              <a:exclusive />
            </a:lockscope>
            <a:locktype>
              <a:write />
            </a:locktype>
          </a:lockentry>
        </a:supportedlock>
      </a:prop>
    </a:propstat>
  </a:response>
  <a:response>
    <a:href>/sgdav/wd.ashx/vaultdemo/Main/smartbear/</a:href>
    <a:propstat>
      <a:status>HTTP/1.1 200 OK</a:status>
      <a:prop>
        <a:creationdate>2009-08-11T18:50:46Z</a:creationdate>
        <a:getlastmodified>Tue, 11 Aug 2009 18:50:46 GMT</a:getlastmodified>
        <a:resourcetype>
          <a:collection />
        </a:resourcetype>
        <a:getcontenttype>httpd/unix-directory</a:getcontenttype>
      </a:prop>
    </a:propstat>
  </a:response>
  <a:response>
    <a:href>/sgdav/wd.ashx/vaultdemo/Main/jlc/</a:href>
    <a:propstat>
      <a:status>HTTP/1.1 200 OK</a:status>
      <a:prop>
        <a:creationdate>2009-08-07T21:44:40Z</a:creationdate>
        <a:getlastmodified>Fri, 07 Aug 2009 21:44:40 GMT</a:getlastmodified>
        <a:resourcetype>
          <a:collection />
        </a:resourcetype>
        <a:getcontenttype>httpd/unix-directory</a:getcontenttype>
      </a:prop>
    </a:propstat>
  </a:response>
  <a:response>
    <a:href>/sgdav/wd.ashx/vaultdemo/Main/public_html/</a:href>
    <a:propstat>
      <a:status>HTTP/1.1 200 OK</a:status>
      <a:prop>
        <a:creationdate>2009-08-05T15:03:19Z</a:creationdate>
        <a:getlastmodified>Wed, 05 Aug 2009 15:03:19 GMT</a:getlastmodified>
        <a:resourcetype>
          <a:collection />
        </a:resourcetype>
        <a:getcontenttype>httpd/unix-directory</a:getcontenttype>
      </a:prop>
    </a:propstat>
  </a:response>
  <a:response>
    <a:href>/sgdav/wd.ashx/vaultdemo/Main/podfiller/</a:href>
    <a:propstat>
      <a:status>HTTP/1.1 200 OK</a:status>
      <a:prop>
        <a:creationdate>2009-04-20T21:12:14Z</a:creationdate>
        <a:getlastmodified>Mon, 20 Apr 2009 21:12:14 GMT</a:getlastmodified>
        <a:resourcetype>
          <a:collection />
        </a:resourcetype>
        <a:getcontenttype>httpd/unix-directory</a:getcontenttype>
      </a:prop>
    </a:propstat>
  </a:response>
</a:multistatus>
Note that another client which doesn't work is DAVExplorer.

paulroub
Posts: 29
Joined: Mon Nov 19, 2007 2:49 pm
Location: Champaign, IL
Contact:

Re: Vault 5: WebDAV compatibility

Post by paulroub » Wed Aug 12, 2009 12:52 pm

I've confirmed that this fails in the 64-bit version of WebDrive, and works in the 32-bit version. The BOM is legal here, but useless, so we'll be taking it out.

-paul
Paul Roub
SourceGear

Post Reply