/[drupal]/contributions/modules/dav/API.txt
ViewVC logotype

Contents of /contributions/modules/dav/API.txt

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations) (download)
Thu May 8 09:52:46 2008 UTC (18 months, 2 weeks ago) by arto
Branch: MAIN
CVS Tags: DRUPAL-6--1-0-ALPHA1, DRUPAL-6--1-0-ALPHA4, DRUPAL-6--1-0-ALPHA2, DRUPAL-6--1-0-ALPHA3, HEAD
Changes since 1.1: +0 -0 lines
File MIME type: text/plain
Imported 6.x branch from the SVN development repository.

Changelog (DAV API):
- Initial port of the module for Drupal 6.x.
- Introduced the RDF API and RDF DB modules as dependencies for purposes of metadata storage.
- Refactored dav.install for Drupal 6.x and Schema API compatibility.
- Refactored the settings screen for Drupal 6.x compatibility.
- Fixed the theming functions for Drupal 6.x compatibility.
- Updated INSTALL.txt instructions to reflect the Drupal 6.x and PHP 5.2.x requirements (dropped support for PHP 4.x altogether).
- Updated README.txt sponsors listing.

Changelog (DAV FS):
- Initial port of the module for Drupal 6.x.
- Refactored the settings screen for Drupal 6.x compatibility.
1 // $Id$
2
3 This document is intended for developers who wish to utilize the DAV API or
4 troubleshoot the operation of DAV modules.
5
6 DATA TYPES
7 ----------
8
9 dav resource
10
11 This is an array of two elements.
12
13
14 HOOKS API
15 ---------
16 (This is yet to be written. For the time being, refer to file_server.module
17 as the canonical example of implementing the API provided by dav.module.)
18
19 NAMESPACE QUERIES
20 -----------------
21 hook_dav_lookup()
22 hook_dav_list()
23
24 METADATA QUERIES
25 ----------------
26 hook_dav_propfind()
27
28 READ-ONLY OPERATIONS
29 --------------------
30 hook_dav_get()
31
32 MUTATIVE OPERATIONS
33 -------------------
34 hook_dav_put()
35 hook_dav_mkcol()
36 hook_dav_delete()
37
38 NAMESPACE OPERATIONS
39 --------------------
40 hook_dav_rename()
41 hook_dav_move()
42 hook_dav_copy()
43
44 LOCKING OPERATIONS
45 ------------------
46 hook_dav_lock()
47 hook_dav_unlock()
48
49 GOTCHAS
50 -------
51 For DAV development work, you can't rely on the misguided-but-popular
52 tracing method of using var_dump() or print_r(), as any extraneous output
53 during the page request will simply be considered malformed input by the DAV
54 client. You also can't really test most of your code from the browser, as
55 DAV relies on a set of HTTP methods that your browser is unlikely to
56 support.
57
58 Instead, you should either write debugging output to the Drupal watchdog or
59 a file, use a real PHP debugger like those based on the open-source XDebug
60 extension, or perhaps try out the Trace module for Drupal.
61
62 DEBUGGING
63 ---------
64 DAV problems can be difficult to troubleshoot. This section gives some
65 pointers on where to start.
66
67 If you're having troubles with a high-level GUI client (like the ones
68 included with Mac OS X or Windows), the first step is to shed some bloat and
69 uncertainty by trying out the cadaver command-line client as advised in
70 README.txt. Cadaver is simple enough that it should always work; if it
71 doesn't, you may have broken DAV at the application protocol level.
72
73 If so, you'll want to capture the HTTP traffic between your DAV client and
74 the Drupal server in order to troubleshoot. There are a great variety of
75 tools to accomplish this; in general, they are called packet sniffers or
76 protocol analyzers. Some popular ones include the GUI-based Wireshark
77 (formerly known as Ethereal) and the command-line tools tcpdump and tcpflow.
78 Depending on your setup, you can run these tools either on the server or on
79 your computer.
80
81 Here's an example of using tcpflow on Mac OS X (to adjust for your specific
82 situation, read the tcpflow manual page):
83
84 # sudo tcpflow -c -i en0 -v port http
85
86 This will show you both the client request as well as the server response,
87 directly in your terminal window. (You'll also gain an undying appreciation
88 of the XML hell DAV is based on.)
89
90 On Mac OS X, the easiest way to install tcpflow is to use MacPorts. For most
91 Linux and *BSD distributions, tcpflow is available directly in the package
92 repository. On Windows, well, try Wireshark.

  ViewVC Help
Powered by ViewVC 1.1.2