客户端交互性

All WebDAV clients fall into one of three categories—standalone applications, file-explorer extensions, or filesystem implementations. These categories broadly define the types of WebDAV functionality available to users. 表 C.1 “” gives our categorization as well as a quick description of some common pieces of WebDAV-enabled software. More details about these software offerings, as well as their general category, can be found in the sections that follow.

表 C.1. 

软件类型WindowsMacLinux描述
Adobe Photoshop独立的WebDAV应用程序X  Image editing software, allowing direct opening from, and writing to, WebDAV URLs.
Cadaver独立的WebDAV应用程序 XXCommand-line WebDAV client supporting file transfer, tree, and locking operations.
DAV Explorer独立的WebDAV应用程序XXXJava GUI tool for exploring WebDAV shares.
Macromedia Dreamweaver独立的WebDAV应用程序X  Web production software able to directly read from and write to WebDAV URLs.
Microsoft Office独立的WebDAV应用程序X  Office productivity suite with several components able to directly read from and write to WebDAV URLs.
Microsoft Web 文件夹文件浏览器WebDAV扩展X  GUI file explorer program able to perform tree operations on a WebDAV share.
GNOME Nautilus文件浏览器WebDAV扩展  XGUI file explorer able to perform tree operations on a WebDAV share.
KDE Konqueror文件浏览器WebDAV扩展  XGUI file explorer able to perform tree operations on a WebDAV share.
Mac OS XWebDAV文件系统实现 X Operating system has built-in support for mounting WebDAV shares..
驱动器映射程序,可以将Windows驱动器加载为远程的WebDAV共享WebDAV文件系统实现X  Drive-mapping program for assigning Windows drive letters to a mounted remote WebDAV share.
文件传输软件,可以将Windows驱动器加载为远程的WebDAV共享WebDAV文件系统实现X  File transfer software, which, among other things, allows the assignment of Windows drive letters to a mounted remote WebDAV share.
davfs2WebDAV文件系统实现  XLinux file system driver that allows you to mount a WebDAV share.

Standalone WebDAV Applications

A WebDAV application is a program that speaks WebDAV protocols with a WebDAV server. We'll cover some of the most popular programs with this kind of WebDAV support.

Microsoft Office,Dreamweaver,Photoshop

在Windows下,有许多已知的应用程序支持WebDAV客户端功能,例如微软Office,[59]Adobe的Photoshop和Macromedia的Dreamweaver程序,他们可以直接打开和保存URL,并且在编辑文件时经常使用WebDAV的锁。

Note that while many of these programs also exist for the Mac OS X, they do not appear to support WebDAV directly on that platform. In fact, on Mac OS X, the File→Open dialog box doesn't allow one to type a path or URL at all. It's likely that the WebDAV features were deliberately left out of Macintosh versions of these programs, since OS X already provides such excellent low-level filesystem support for WebDAV.

cadaver, DAV Explorer

cadaver is a bare-bones Unix command-line program for browsing and changing WebDAV shares. Like the Subversion client, it uses the neon HTTP library—not surprisingly, since both neon and cadaver are written by the same author. cadaver is free software (GPL license) and is available at http://www.webdav.org/cadaver/.

Using cadaver is similar to using a command-line FTP program, and thus it's extremely useful for basic WebDAV debugging. It can be used to upload or download files in a pinch, and also to examine properties, and to copy, move, lock or unlock files:

$ cadaver http://host/repos
dav:/repos/> ls
Listing collection `/repos/': succeeded.
Coll: > foobar                                 0  May 10 16:19
      > playwright.el                       2864  May  4 16:18
      > proofbypoem.txt                     1461  May  5 15:09
      > westcoast.jpg                      66737  May  5 15:09

dav:/repos/> put README
Uploading README to `/repos/README':
Progress: [=============================>] 100.0% of 357 bytes succeeded.

dav:/repos/> get proofbypoem.txt
Downloading `/repos/proofbypoem.txt' to proofbypoem.txt:
Progress: [=============================>] 100.0% of 1461 bytes succeeded.

DAV Explorer is another standalone WebDAV client, written in Java. It's under a free Apache-like license and is available at http://www.ics.uci.edu/~webdav/. It does everything cadaver does, but has the advantages of being portable and being a more user-friendly GUI application. It's also one of the first clients to support the new WebDAV Access Control Protocol (RFC 3744).

Of course, DAV Explorer's ACL support is useless in this case, since mod_dav_svn doesn't support it. The fact that both cadaver and DAV Explorer support some limited DeltaV commands isn't particularly useful either, since they don't allow MKACTIVITY requests. But it's not relevant anyway; we're assuming all of these clients are operating against an autoversioning repository.

File-Explorer WebDAV Extensions

Some popular file explorer GUI programs support WebDAV extensions that allow a user to browse a DAV share as if it was just another directory on the local computer, and to perform basic tree editing operations on the items in that share. For example, Windows Explorer is able to browse a WebDAV server as a “network place.” Users can drag files to and from the desktop, or can rename, copy, or delete files in the usual way. But because it's only a feature of the file-explorer, the DAV share isn't visible to ordinary applications. All DAV interaction must happen through the explorer interface.

Microsoft Web 文件夹

Microsoft was one of the original backers of the WebDAV specification, and first started shipping a client in Windows 98, which was known as Web Folders. This client was also shipped in Windows NT4 and 2000.

The original Web Folders client was an extension to Explorer, the main GUI program used to browse filesystems. It works well enough. In Windows 98, the feature might need to be explicitly installed if Web Folders aren't already visible inside My Computer. In Windows 2000, simply add a new “network place”, enter the URL, and the WebDAV share will pop up for browsing.

With the release of Windows XP, Microsoft started shipping a new implementation of Web Folders, known as the WebDAV Mini-Redirector. The new implementation is a filesystem-level client, allowing WebDAV shares to be mounted as drive letters. Unfortunately, this implementation is incredibly buggy. The client usually tries to convert http URLs (http://host/repos) into UNC share notation (\\host\repos); it also often tries to use Windows Domain authentication to respond to basic-auth HTTP challenges, sending usernames as HOST\username. These interoperability problems are severe and documented in numerous places around the Web, to the frustration of many users. Even Greg Stein, the original author of Apache's WebDAV module, bluntly states that XP Web Folders simply can't operate against an Apache server.

Windows Vista's implementation of Web Folders seems to be almost the same as XP's, so it has the same sort of problems (at the time of writing).

However, there seem to be workarounds for both XP and Vista that allow Web Folders to work against Apache. Users have mostly reported success with these techniques, so we'll relay them here.

On Windows XP, you have two options. First, search Microsoft's web site for update KB90730, “Software Update for Web Folders.” This may fix all your problems. If it doesn't, it seems that the original pre-XP Web Folders implementation is still buried within the system. You can unearth it by going to Network Places and adding a new network place. When prompted, enter the URL of the repository, but include a port number in the URL. For example, http://host/repos should be entered as http://host:80/repos instead. Respond to any authentication prompts with your Subversion credentials.

On Windows Vista, the same KB90730 update may clear everything up. But there may still be other issues. Some users have reported that Vista considers all http:// connections insecure, and thus will always fail any authentication challenges from Apache unless the connection happens over https://. If you're unable to connect to the Subversion repository via SSL, you can tweak the system registry to turn off this behavior. Just set the key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WebClient\Parameters\BasicAuthLevel from 1 to 2. A final warning: be sure to set up the Web Folder to point to the repository's root directory (/), rather than some subdirectory such as /trunk. Vista Web Folders seems to work only against repository roots.

In general, while these workarounds may function for you, you might get a better overall experience using a third-party WebDAV client such as WebDrive or NetDrive.

Nautilus,Konqueror

Nautilus is the official file manager/browser for the GNOME desktop (http://www.gnome.org), and Konqueror is the manager/browser for the KDE desktop (http://www.kde.org). Both of these applications have an explorer-level WebDAV client built in, and they operate just fine against an autoversioning repository.

In GNOME's Nautilus, select the File→Open location menu item and enter the URL in the dialog box presented. The repository should then be displayed like any other filesystem.

KDE的Konqueror里你需要在地址栏使用webdav://模式来输入URL,如果你输入http://的URL,Konqueror会像普通的web浏览器。你会看到mod_dav_svn输出的普通HTML目录列表。通过输入webdav://host/repos代替http://host/repos,Konqueror就成为了一个WebDAV客户端,并且按照文件系统的方式显示版本库。

WebDAV Filesystem Implementation

The WebDAV filesystem implementation is arguably the best sort of WebDAV client. It's implemented as a low-level filesystem module, typically within the operating system's kernel. This means that the DAV share is mounted like any other network filesystem, similar to mounting an NFS share on Unix or attaching an SMB share as drive letter in Windows. As a result, this sort of client provides completely transparent read/write WebDAV access to all programs. Applications aren't even aware that WebDAV requests are happening.

WebDrive,NetDrive

Both WebDrive and NetDrive are excellent commercial products that allow a WebDAV share to be attached as drive letters in Windows. As a result, you can operate on the contents of these WebDAV-backed pseudo-drives as easily as you can against real local hard drives, and in the same ways. WebDrive can be purchased from South River Technologies (http://www.southrivertech.com). Novell's NetDrive is freely available online, but requires users to have a Netware license.

Mac OS X

Apple's OS X operating system has an integrated filesystem-level WebDAV client. From the Finder, select the Go→Connect to Server menu item. Enter a WebDAV URL, and it appears as a disk on the desktop, just like any other mounted volume. You can also mount a WebDAV share from the Darwin terminal by using the webdav filesystem type with the mount command:

$ mount -t webdav http://svn.example.com/repos/project /some/mountpoint
$

注意如果mod_dav_svn是1.2之前的版本,OS X不能按照可读写装载,而是会成为只读。这是因为,OS X坚持要读写共享支持锁定,而锁定文件出现在Subversion 1.2。

Also, OS X's WebDAV client can sometimes be overly sensitive to HTTP redirects. If OS X is unable to mount the repository at all, you may need to enable the BrowserMatch directive in the Apache server's httpd.conf:

BrowserMatch "^WebDAVFS/1.[012]" redirect-carefully

Linux davfs2

Linux davfs2是一个Linux核心的文件系统模块,开发坐落在http://dav.sourceforge.net/。一旦安装,一个WebDAV网络共享可以使用mount命令装载:

$ mount.davfs http://host/repos /mnt/dav


[59] 在Windows下,有一些有名的集成WebDAV客户端功能的软件,例如Microsoft's Office、Adobe的Photoshop和Macromedia的Dreamweaver。它们都可以直接打开和保存URL,也可以在编辑时大量的使用WebDAV的锁定。