SabreDAV 1.0.9 released & CalDAV news
The last SabreDAV announcement I made here was 1.0.4, which happened in January. Just today I've released 1.0.9, so I figured it's time for a small update.
A public demo site
I've bought the sabredav.org domain, and placed a live demo on it for people to try out. Give it a shot:
- url demo.sabredav.org.
- username: testuser
- password: test
Please note that OS/X Finder will not be able to upload files here, because it uses the Chunked Transfer Encoding, which is not supported by sourceforge's webserver Nginx. Read more here.
Bugfixes
There's been a number of small(ish) bugfixes.
- Fixed fatal error when a malformed url was called.
- Issue 19: Better responses to HEAD requests on collections, improving compatibility with MS Office.
- Issue 23: Fixed Allow header, improving compatibility with Evolution.
- Issue 21: Typo.
- Issue 27: Incorrect encoding of entities in properties.
- Issue 29: Missing constant causing fatal error on lock requests with infinite timeouts.
So there it is. You can download the latest version on the googlecode project page.
CalDAV
CalDAV support is going well. Currently iCal, Evolution and Lightning/Sunbird are supported. If you want to test it out, be sure to download the alpha version (1.1.x), and read the related documentation.
IRC
I've also setup an irc channel on freenode.net. If you feel like idling somewhere new, head over to #sabredav.
SabreDAV 1.0.4 released
I just released SabreDAV version 1.0.4.
SabreDAV now supports RFC 4709 through a plugin. This RFC defines a standard way to tell operating system a WebDAV share should be mounted. Example code to make this work easily is included in the actual RFC document (scroll down). It is not supported by default by any operation system at the moment, so if you want to plug your own DavMount implementation for OS/X or Linux, I'll be happy to list you.
The other change is that releases are now also pushed to Pearfarm. I'm still testing this so this might not end up being the official channel. If you'd like to try the new installation method, you can easily do so using:
pear channel-discover evert.pearfarm.org
pear install evert.pearfarm.org/Sabre_DAV
OS/X WebDAV and Chunked Transfer Encoding
While OS/X's WebDAV implementation is quite slow, it is mostly pretty decent. The client uses the little used Chunked transfer encoding for PUT requests, which allows it to send big files without knowing exactly how big the file is going to be. A request like this looks like this:
PUT /image.png HTTP/1.1
Host: example.org
User-Agent: WebDAVFS/1.8 (01808000) Darwin/10.2.0 (i386)
Accept: */*
X-Expected-Entity-Length: 10316
If: (<opaquelocktoken:44445502-c253-02e6-7198-45b36c96e8c7>)
Connection: close
Transfer-Encoding: Chunked
While this is a perfectly legal HTTP request, webservers choke on it. Both Nginx and Lighttpd respond with HTTP 411 Length Required. This would have been valid for HTTP/1.0 servers, but if they claim to support HTTP/1.1 they must accept these requests.
Apache + mod_php does this fine, but just recently I got a report from someone using Apache + fastcgi + php. In this case the request body never arrived in PHP which can unfortunately result in silent data loss.
So I guess that's a bit of a warning, so far OS/X WebDAV only plays nicely with Apache + mod_php servers.
SabreDAV reaches 1.0
After lots of testing, coding and integrating SabreDAV in a few systems, SabreDAV has reached 1.0.
What's that?
For those of you randomly stumbling on this blog, SabreDAV is a tool I've been working on to allow easy integration of PHP and WebDAV. While looking at WebDAV implementions out there for PHP, there weren't really any standards-compliant and flexible solutions out there, so I decided to write my own.
Since then it has gained some popularity, and the beta version has been tested and implemented in a number of places. It's open source (under the BSD license), so anybody can grab it and use it.
If you don't really know what WebDAV is, it is basically a filesystem protocol that works on top of HTTP. By implementing WebDAV (or SabreDAV specifically) you are able to expose your web application as if it was a filesystem to the users. WebDAV is supported by any major operating system.
If you're interested in SabreDAV, check out the example, or tutorial.
Changes
The last round of changes since 0.12.1 are mostly cleanups, but the most important are the following:
- SimpleDirectory class
- Authentication plugin is no longer included. The plugin was not yet production ready, and in order to allow myself to make API changes, I needed to remove it for 1.0. This does not mean you can no longer use the recommended way to implement authentication.
- The unknownProperties event was removed, replaced by the afterGetPropertiesEvent (docs).
- Addition of more events for plugin writers.
- Lots of cleaning up, unittests.
Full changelog and download.
Future plans
Although the 1.0 version should be a bit of a milestone, the release had actually been sitting ready for a while. So while 1.0 is cool and all, I've already spent a great deal of time implementing RFC 3744 a.k.a. ACL extensions for WebDAV. Support for ACL will be added as a separate module in the future.
While these changes are going on, no backwards compatibility breaking changes should be made to the API's. For more details on the BC and versioning policy, check here.
Thanks!
It's been a lot of hard work to get here, but seeing some uptake is very rewarding. I would probably have given up on this if it weren't for the people asking questions, making suggestions and filing reports. Thanks for that, it makes it worth it!
SabreDAV 0.12
I just released a new version of SabreDAV, 0.12. I've skipped on posting for the last few versions, because I didn't want to get too spammy on this blog.
These were mostly bugfixes, and a few added features. SabreDAV is also a PEAR-package again, so installing is as simple as 'pear install SabreDAV-0.12.0.tgz'.
Full list of changes
- Added: Experimental PDO backend for Locks Manager.
- Fixed: Sending Content-Length: 0 for every empty response. This improves NGinx compatibility.
- Fixed: Last modification time is reported in UTC timezone. This improves Finder compatibility.
- Fixed: Issue 13.
- Added: now a PEAR-compatible package again, thanks to Michael Gauthier.
- Added: Plugin to automatically map GET requests to non-files to PROPFIND (Sabre_DAV_Browser_MapGetToPropFind). This should allow easier debugging of complicated WebDAV setups.
- Added: Ability to choose to use auth-int, auth or both for HTTP Digest authentication. (Issue 11)
- Fixed: TemporaryFileFilter plugin now intercepts HTTP LOCK requests to non-existant files. (Issue 12)
- Updated: Browser plugin now shows multiple {DAV:}resourcetype values if available.
- Added: generatePropfindResponse now takes a baseUri argument.
- Added: ResourceType property can now contain multiple resourcetypes.
- Added: Sabre_DAV_Property_Href class. For future use.
- Changed: Made more methods in Sabre_DAV_Server public.
- Added: Central list of defined xml namespace prefixes. This can reduce Bandwidth and improve legibility for xml bodies with user-defined namespaces.
- Changed: moved default copy and move logic from ObjectTree to Tree class.
SabreDAV 0.9
Just released the 0.9 version of SabreDAV.
This release mainly contains bugfixes and some API changes that will facilitate future extensions, such as ACL and CalDAV.
Although these changes might not be relevant to most people, upgrading is recommended in order to keep a solid upgrade path. Fortunately for most people the API breaks are minimal.
SabreDAV 0.8
I just released v0.8 of the SabreDAV library. This is mostly a bugfix release, and fixes some compatibility problems with both Windows Vista and adds support for Netdrive.
Netdrive is free for home-use and is an alternative for the built-in clients from Windows XP or Vista. Do not use it if it's more than 1 person accessing data from a webdav share, I can not stress this enough.. If it's just you, you'll find it works much smoother than the built-in client.
Compatibility break
All exception classnames are renamed. They follow Sabre_DAV_Exception_FileNotFound, instead of the Sabre_DAV_FileNotFoundException convention. This change was made for consistency reasons. If you implemented anything custom, you will probably run into this while upgrading.
Download and the full changeLog.
Future
It's pretty close to being feature-complete, so unless I really missed something or more bugs will be found this will probably move quickly towards 1.0. Thanks for the support and using it!
SabreDAV 0.7
Just released 0.7 of the SabreDAV library. This release implements some of the more obscure WebDAV features, and a plugin system.
Some changes:
- Basic plugin system.
- Comes with a plugin to display html indexes for browsers.
- Sabre_DAV_FilterTree is now Sabre_DAV_Tree_Filter.
- Sabre_DAV_TemporaryFileFilter is now Sabre_DAV_Tree_TemporaryFileFilter.
Any help is greatly appreciated. I'm finding this taking up a large amount of my free time, so anyone interested in documenting, fixing bugs, writing tests, implementing additional webdav rfc's, making logo's definitely send a message to the mailing list.
WebDAV-related RFC's
In an attempt to better understand the WebDAV standards space, I made up a non-scientific graph of all the specs and dependencies. I'd like to get started with CalDAV, but I have a few other specs to implement before I'll be able to do that.

The next one for me on the list is ACL. Attempting to integrate these new features within the existing system so far has proven to be very challenging. The big reason is my (perhaps high) requirements on how this is supposed to work:
- It shouldn't touch the existing WebDAV system (at all), because 99% of the users will not use ACL.
- The interface & implementation should still be understandable if you are implementing ACL.
- I like the existing WebDAV class structure as it stands, so if I have to make changes in the design; it should still be easy to grasp.
SabreDAV 0.6
I just finished up a new release of SabreDAV. The mailing list is getting some traction, and it's shows! There were quite a bit of suggestions and patches recently, so the changelog is relatively big. The best thing that can happen is of course people liking and using it, and it makes me also more excited to work on it :).
Most notable changes:
- Added: We're now using streams for passing contents of files around everywhere. Not only is this a big speed improvement, but it also reduces memory consumption quite a bit for larger files. It should be noted that this breaks API compatibility as the ->put and ->createFile methods will now no longer receive strings.
- Added: HTTP Digest authentication helper.
- Added: Support for HTTP Range header, ETags and overriding default Content-Type.
- Added: 49 unittests.
- Updated: Using Clark notation for serializing custom properties. If you use custom properties this affects you, because properties are no longer serialized as http://namespace#tagName, but {http://namespace}tagName.
- Removed: SabreDAV is no longer distributed as a pear package. The main reason for this is that I had too much trouble figuring out how it works. I use phing as my build-tool, and although there's some good integration points with pear packaging, I couldn't get it to do what I wanted. So now it's a regular gzip tarball.
- Bugfixes!
Special thanks to Andreas Gohr, Luidnel Maignan and Stephan Wenz for patches and suggestions.
Next page








