SabreDAV 1.5 released with CardDAV support

sabredav_200x60.png

Over the last month I've been working hard at the Atmail office in sunny Australia to get CardDAV support built into SabreDAV; and I've finally completed all the steps to do this release.

So there it is, CardDAV. Unfortunately there are not yet a lot of clients who actually use it, and it mainly comes down to iOS and OS/X, but I've been asked about CardDAV a lot and suspect more people will become interested in this protocol (especially if more vendors start supporting it).

So that's pretty much it; head over to download page to fetch a copy. I've had to break a couple of minor api's, you can read about those in the migration document.

I tried my best to write good documentation for the new stuff, but it's always very time consuming, and not as good as I'd like If you have time and the will to write more, let me know!

Lastly, a big thank you to Nick Boutelier for creating the new SabreDAV logo!

Speaking at the PHPBenelux march meetup

PHP-BENELUX-Logo.preview.png

I'll be speaking the next PHPBenelux meetup in Amersfoort about implementing WebDAV using PHP. Joshua Thijssen will also be doing a talk about MySQL optimization. The meetups are free, so if you have some time after work, drop by and say hi. You can sign up at the PHPBenelux site.

SabreDAV 1.4.0-beta released

Last Saturday I put up version SabreDAV 1.4.

It's taken a while to get this one out. Much longer than I thought. The result was that there's been very little released over the past few months. In an effort to change this, I decided to release 1.4.0 as soon as possible, rather than when all the features are ready. I believe this is better for the end-user and for me as well (release early, release often, etc).

So there it is. These are the new major features:

  • WebDAV ACL support. This part is not 100% done. It can be integrated into existing API's, but there's no central ACL store or ability to modify ACL's through the WebDAV protocol yet. These additional features will be added in subsequent versions.
  • CalDAV proxy support. This is a proprietary apple extension, allowing users to delegate calendar access to other users.
  • Integrated the 'VObject' library, which provides an easy way to read and write iCalendar objects with an api similar to SimpleXML.
  • Added the ICSExportPlugin, allowing you to export iCalendar-formatted calendars.

full changelog

To allow for a proper ACL implementation, much of the 'principal' functionality has been moved from Sabre_DAV_Auth to Sabre_DAVACL. There's a Migration guide available with all the details.

As usual, if you're not ready to migrate to 1.4 because of the API breaks or because it's still considered beta, I'll be maintaining 1.3 for at least another year. However, I'll be doing this on a strictly on-demand basis. So if you need a bugfix backported or a release, feel free to ask on the mailing list.

Lastly, thanks to all the users. The number of deployments and feedback is steadily growing and that's very rewarding.

Download here.

SabreDAV 1.3.0 released

I just released version 1.3.0 of SabreDAV. Uptake has been very strong, especially for the CalDAV components. The biggest change is a big performance boost for most tree operations.

To upgrade, download the new file here, or if you installed it using pear:

  1. pear upgrade sabredav/Sabre_DAV
  2. pear upgrade sabredav/Sabre_CalDAV

To install using pear:

  1. pear channel-discover pear.sabredav.org
  2. pear install sabredav/Sabre_DAV
  3. pear install sabredav/Sabre_CalDAV

There is a list of 4 (smallish) backwards compatibility breaks in the API. You can read about it in the migration guide.

Full list of changes:

  • Added: Cache layer in the ObjectTree.
  • Added: childExists method to Sabre_DAV_ICollection. This is an api break, so if you implement Sabre_DAV_ICollection directly, add the method.
  • Changed: Almost all HTTP method implementations now take a uri argument, including events. This allows for internal rerouting of certain calls. If you have custom plugins, make sure they use this argument. If they don't, they will likely still work, but it might get in the way of future changes.
  • Changed: All getETag methods MUST now surround the etag with double-quotes. This was a mistake made in all previous SabreDAV versions. If you don't do this, any If-Match, If-None-Match and If: headers using Etags will work incorrectly. (Issue 85).
  • Added: Sabre_DAV_Auth_Backend_AbstractBasic class, which can be used to easily implement basic authentication.
  • Removed: Sabre_DAV_PermissionDenied class. Use Sabre_DAV_Forbidden instead.
  • Removed: Sabre_DAV_IDirectory interface, use Sabre_DAV_ICollection instead.
  • Added: Browser plugin now uses {DAV:}displayname if this property is available.
  • Added: Tree classes now have a delete and getChildren method.
  • Fixed: If-Modified-Since and If-Unmodified-Since would be incorrect if the date is an exact match.
  • Fixed: Support for multiple ETags in If-Match and If-None-Match headers.
  • Fixed: Improved baseUrl handling.
  • Fixed: Issue 67: Non-seekable stream support in ::put()/::get().
  • Fixed: Issue 65: Invalid dates are now ignored.
  • Updated: Refactoring in Sabre_CalDAV to make everything a bit more ledgable.
  • Fixed: Issue 88, Issue 89: Fixed compatibility for running SabreDAV on Windows.
  • Fixed: Issue 86: Fixed Content-Range top-boundary from 'file size' to 'file size'-1.

I plan to fully keep supporting the 1.2.* branch, but I'll backport bugfixes strictly on an on-demand basis. So far there's been relatively little people stuck on older versions, so I'm only spending time on it in case anyone depends on it.

Thanks to all the people reporting bugs and posting patches!

SabreDAV 1.2 released (with CalDAV support)

It's taken almost 12 months, but I finally finished a CalDAV plugin for SabreDAV. I've stayed within the standard as much as possible, but had to leave out some features that failed to meet the cost/benefit requirement.

Most importantly, there's solid support for Apple iCal, Evolution, Lightning/Sunbird, and the iPhone.

It all uses PDO, and it's tested on both SQLite3 and MySQL.

SabreDAV is primarily intended as a toolkit to implement these protocols in different applications. Despite that, it should be reasonably easy to setup your own CalDAV server. Head over to the instructions to figure out how.

Other changes and additions

  • CalDAV (RFC4791).
  • PDO backends for Locks, Authentication and Calendars.
  • 95% unittesting code coverage. 415 unittests. There's actually more unittesting code now than 'normal' code.
  • ACL (RFC3744) principals. Note that privileges are not yet implemented.
  • Support for Extended MKCOL (RFC5689).
  • Support for current-user-principal (RFC5397).
  • Now throwing an error if you're using Finder on an unsupported server (nginx, apache + fcgi, lighttpd).
  • Support for If-Range, If-Modified-Since, If-Unmodified-Since, If-Match and If-None-Match.
  • There's now 2 distributions. 1 unified zip with all the features, as well as 4 separate pear packages (Sabre, Sabre_HTTP, Sabre_DAV, Sabre_CalDAV).

If you're upgrading from 1.0, some changes have been made. Take a look at the migration guide for more information.

Download.

Future plans

The next big thing will be CardDAV. It won't take nearly as long as CalDAV support, as there are a lot of similarities. In general I feel I should spend a bit less time on this. I've been spending a large portion of my time in developing SabreDAV into a mature project, which can be hard to justify if it's not a source of income. I need to eat, after all.

I'm still enjoying it very much though and the best way to keep me motivated is to let me know you're using it or by requesting a new feature =).

SabreDAV 1.0.9 released & CalDAV news

SabreDAV logo

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:

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.

  1. Fixed fatal error when a malformed url was called.
  2. Issue 19: Better responses to HEAD requests on collections, improving compatibility with MS Office.
  3. Issue 23: Fixed Allow header, improving compatibility with Evolution.
  4. Issue 21: Typo.
  5. Issue 27: Incorrect encoding of entities in properties.
  6. 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:

  1. pear channel-discover evert.pearfarm.org
  2. pear install evert.pearfarm.org/Sabre_DAV

Download here

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:

  1. PUT /image.png HTTP/1.1
  2. Host: example.org
  3. User-Agent: WebDAVFS/1.8 (01808000) Darwin/10.2.0 (i386)
  4. Accept: */*
  5. X-Expected-Entity-Length: 10316
  6. If: (<opaquelocktoken:44445502-c253-02e6-7198-45b36c96e8c7>)
  7. Connection: close
  8. 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'.

Download it here.

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.
 1 2 3 Next →

About

My name is Evert, and I've been writing semi-regularly on this blog since 2006.

I'm currently available for contract work.

more info.

Subscribe

Dropbox

Dropbox is a simple cross-platform online backup and sync application. The first 2GB of space is free, and both you and me get an extra 250MB extra space if you sign up through this link.