Hi Brendan
Is there are reason you want to use webDAV? I have wasted a lot of time
trying to implement it. The Finder on MacOS supports webDAV but is very
unforgiving. The slightest mistake will cause your entire computer to hang!
You will have to pull the power cord!!!!
I have implemented OPTIONS, PROPFIND, MOVE, COPY, DELETE. a stub for LOCK,
UNLOCK. I also implemented GET,PUT, and POST for small files. I have not
implemented PROPFIND. PROPFIND is used by windows xp. I still have a lot of
work to do to get this to work with windows xp, and linux
In general webDAV is a very lame protocol. Most of the clients are very
buggy. The spec is poorly written resulting in poor interopablity between
various clients. I started implementing it because I need a way to transfer
files between a computer and the iphone. Every one on I asked said use
webDAV, its easy. Over the week end I came to realize I would probably be a
lot easier to just implement an HTTP server. You provide an implementation
of get that returns an html page allowing users to get files, or provides a
directory listing, the directory list html allows user to delete individual
files, add a sub dir, upload a file.
Here is a high level spec for implementing get
- if URL is for a a file, return file
- if URL is for a directory, return html directory listing as follows
<H1> directory path</h1>
For each entry in directory (include .. to navigate to parent)
If file
<li><a href="url">file name size</> <button
onclick="location=./url?delete">delete</button></li>
If dir
<li>a href="url><img src="folder.jpg>dir name</> button
onclick="location=./url?delete">delete</button></li>
At the bottom of the html
Create a form to enable users to upload files
<form id="uploadForm" action="
http://your service.com" method="post"
enctype="multipart/form-data" autocomplete="off">
<input id="file" name="input" size="41" type="file" />
</form>
Add another form to allow users to create a sub dir.
I have not implemented this myself yet. It seems dramatically easier if you
already have a good web server.
The only reason I can think to use webDAV is if you needed file level
locking for some reason.
Let me know what you decide to do
Andy