Home > Articles

  • Print
  • + Share This
This chapter is from the book

The DAV Protocol

The DAV protocol extends HTTP with new methods that allow a DAV client to create, modify, and update files and directories in the server. The client can also access metadata about the resource, such as the author and the date of creation, and lock resources for editing. The integration with HTTP allows DAV to take advantage of existing features, such as SSL for encryption and certificate-based authentication, HTTP basic authentication, proxy servers, and so on. Integration with Apache allows many other possibilities, such as sharing access control mechanisms and interaction with scripting engines such as mod_perl and PHP.

The DAV protocol itself is extensible. Although the resources accessed via DAV usually live in the file system, DAV can act as a standards-based front end to a variety of backend repositories such as databases, version control systems, and proprietary document management frameworks.

For example, DAV has the concept of collections, which are groups of files. This usually translates to a directory in the server, but it might have a completely different meaning for other backends.

The DAV protocol defines the following new HTTP methods:

  • COPY: Copy files or collections (equivalent to file system directories). Additional headers enable you to specify the recursive copy of nested collections.

  • MOVE: Move files and collections.

  • MKCOL: Creates a new collection. If parent collections do not exist, an error is raised. Parent collections must be explicitly created using the PUT method.

  • PROPFIND: You learned earlier that DAV resources could have metadata information associated with them. The PROPFIND method enables you to query this information.

  • PROPPATCH: This method enables you to delete, create, and modify resource metadata.

  • LOCK and UNLOCK: These methods allow you to lock a resource. This is useful, for example, for preventing modification to a resource while you are editing it.

The DAV protocol extends existing HTTP methods such as GET and PUT, mainly to make them aware of the new locking features. The OPTIONS method is extended to report DAV capabilities.

  • + Share This
  • 🔖 Save To Your Account