Yes, thanks for the examples, I'm sure I can take it from there.
Re IIS - Yes, took me the better part of an afternoon (since I don't
have any nice WebDAV debugging tools) to figure out that one should
completely uninstall the WebDAV feature from IIS before SabreDAV will
be working. Even though the default WebDAV was already disabled on
the particular test website, it seems IIS "filters" all HTTP DAV
methods out and only leaves the normal GET, PUT, OPTIONS methods for
the websites when WebDAV is installed. Cost me to first make Sabre
work on Lighttp on the same machine to have a working webserver to
have something to compare against. This step may still be a bit
extreme (i.e. may still be a less extreme way to get ALL methods to
come through even though dav is installed), but it is what worked in
the end. Any less extreme tips welcome! Especially since SabreDAV
will most likely have to share IIS in production environments and
can't enforce a complete removal of the standard WebDAV for other
sites.
Also, if you do not want Basic WebClient authentication and want
digest, do not enable it in your registry. Seems windows then refuse
to use anything else but basic.
The URL rewriter in IIS 7.5 is not installed by default, but can be
downloaded from Microsoft and is really powerful and available for
both 32 and 64bit editions. Great tutorial here:
http://learn.iis.net/page.aspx/460/using-the-url-rewrite-module/
And last but not least, SabreDAV requires the $_SERVER['REQUEST_URI']
which is not set by IIS, so I fixed that with the following code
before any Sabre code is loaded:
// If using IIS Rewriter then this is set
if (isset($_SERVER['HTTP_X_ORIGINAL_URL']))
$_SERVER['REQUEST_URI'] = $_SERVER['HTTP_X_ORIGINAL_URL'];
// Else build our own
if (!isset($_SERVER['REQUEST_URI'])) {
$_SERVER['REQUEST_URI'] = '/'.substr($_SERVER['PHP_SELF'],1 );
if (isset($_SERVER['QUERY_STRING'])&&$_SERVER['QUERY_STRING']!
='') {
$_SERVER['REQUEST_URI'] = $_SERVER['REQUEST_URI'].='?'.
$_SERVER['QUERY_STRING'];
}
}
Any tips on how you do your DAV debugging would also be welcome? I'm
sure I'll need it sooner rather than later, especially when adding new
properties, trying to save cookies, sessions, etc. I do not see any
easy way to enable some sort of debug logging in Sabre (besides
logging the source line numbers in exceptions).