Apply os.path.expanduser to acl.filename option.

This improves consistency as other configuration
options already support '~' in paths.

Signed-off-by: Rene Wagner <rw@nelianur.org>
Advertise access-control support
Merge remote-tracking branch 'muelli/master'

Conflicts:
	calypso/__init__.py

Just changes in how debug lines were commented out.
execute external git calls using subprocess

this has the advantage of not spawning a shell, eliminating potential
problems with whitespace in path/file names.

as opposed to the original implementation, this *will* raise an
exception if the git call fails. for lack of knowledge on how calypso
prefers to handle exceptions, it goes unhandled for now.
reflect http authentication in git commit

this is mostly passing context (user-agent, user name, potentially also
user email address if the authentication scheme provides it, or source
host) around through the layers from authentication to git committing,
where the user is set as the author of the commit and the user agent is
included in the commit message.
split htpasswd entries to no more than two parts

this avoids an error that occurs when a ':' occurs inside an unencrypted
(plain) password
Apply os.path.expanduser to SSL config paths.

Signed-off-by: Rene Wagner <rw@nelianur.org>
Handle collections with paths of depth greater 2.

Previously, calendar URLs such as /user/calendars/work
would lead to files being written in /user/calendars
and not being checked into Git.

Signed-off-by: Rene Wagner <rw@nelianur.org>
Handle requests to non-existant URLs gracefully.

Previously, a GET request on / would result in multiple
exceptions.

Signed-off-by: Rene Wagner <rw@nelianur.org>
Always require authorization.

Previously, one could have probed the server for (non-)existance
of a given URL without authorization.

Signed-off-by: Rene Wagner <rw@nelianur.org>
Allow requests with no collection, but require authorization

Not allowing requests without authorization causes the Android CalDAV
application to abandon the connection.

Signed-off-by: Keith Packard <keithp@keithp.com>
Set server log level to WARN

Signed-off-by: Keith Packard <keithp@keithp.com>
Enable REPORT debugging under DEBUG log level

Useful when debugging protocol issues

Signed-off-by: Keith Packard <keithp@keithp.com>
Revert "Handle collections with paths of depth greater 2."

This reverts commit 9cd10d84e0c47aee30b39e27b7232c6271837db1.

This patch breaks REPORT requests for paths like /private/calendar
Centralize URL whacking to 'paths.py'.

This provides general utilities to pull URLs into 'collection' and
'resource' elements. Collections are directories, resources are
calendar/card entrie within those directories.

Signed-off-by: Keith Packard <keithp@keithp.com>
Evolution seriously quotes If-Match headers

It sends \"...\", so use rfc822.quote as an added match

Signed-off-by: Keith Packard <keithp@keithp.com>
Create new vcard files with more sensible names

Vcard file names should look like 'card-xxxxxxx.vcf' now.

Signed-off-by: Keith Packard <keithp@keithp.com>
Remove spurious printfs

Signed-off-by: Keith Packard <keithp@keithp.com>
Actually make --debug flag work

Initialize logging level in calypso.py, don't reset it in
calypso/__init__.py

Use global 'log' variables everywhere instead of stuffing a logger
into each http server.

Signed-off-by: Keith Packard <keithp@keithp.com>
Use @check_rights in do_OPTIONS so that evolution works

This is how evolution knows that a password is required; if we don't
check here, it won't ever send one (and it will fail forevermore...)

Signed-off-by: Keith Packard <keithp@keithp.com>