Giter Site home page Giter Site logo

kozea / radicale Goto Github PK

View Code? Open in Web Editor NEW
3.1K 107.0 413.0 4.64 MB

A simple CalDAV (calendar) and CardDAV (contact) server.

Home Page: https://radicale.org

License: GNU General Public License v3.0

Python 87.17% JavaScript 9.66% HTML 1.62% Dockerfile 0.18% CSS 1.37%
python caldav icalendar carddav

radicale's Introduction

Radicale

Test Coverage Status

Radicale is a small but powerful CalDAV (calendars, to-do lists) and CardDAV (contacts) server, that:

  • Shares calendars and contact lists through CalDAV, CardDAV and HTTP.
  • Supports events, todos, journal entries and business cards.
  • Works out-of-the-box, no complicated setup or configuration required.
  • Can limit access by authentication.
  • Can secure connections with TLS.
  • Works with many CalDAV and CardDAV clients
  • Stores all data on the file system in a simple folder structure.
  • Can be extended with plugins.
  • Is GPLv3-licensed free software.

For the complete documentation, please visit Radicale master Documentation.

Additional hints can be found

Before reporting an issue, please check

radicale's People

Contributors

ambv avatar bobrippling avatar cfboscher avatar chripo avatar christopher-besch avatar da2x avatar deronnax avatar eugene-davis avatar fjl avatar freakmaxi avatar funkyfuture avatar gardenrobot avatar geyser avatar heull001 avatar horgix avatar itglob avatar jaesivsm avatar jspricke avatar lize avatar matthewhana avatar matthiasjordan avatar metallerok avatar necoro avatar paradoxxxzero avatar pbiering avatar shenek avatar tgy avatar unrud avatar untitaker avatar vuntz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

radicale's Issues

Ubuntu precise package still on 0.6.3

Hi all,

Trying to get going with Radicale so thought I would install the Ubuntu package. Turns out the Ubuntu package is still distributing version 0.6.3 and version 0.8 was released already.

I know nothing about package distribution but who should I friendly nudge to update the package or is there a way to create a pull request for the package somewhere?

Thanks!

BB10 Carddav Support

Hi there,

i can use Radicale with BB10 to sync my calendar. Everything works fine, but Carddav does not work, BB10 always says my entered account data is invalid, but i use the same account with my Caldav.

Thanks.

Nested calendars are not handled

When /user/calendar.ics is a calendar, there's no way to add nested calendars (at /user/calendar.ics/nested.ics URL for example).

No CardDav document

Hi,thanks for this great lib.

I just run it and connect to it via ios calDav .
But when for the current release ,it seems that you have contains CardDav support.
how cloud I connect to the radicale for CardDav support?
please update the document.
or give an sign of how to connect to it for CardDav at IOS?

thanks

CardDAV with iPhone not working

Hi,
Am using Radicale 0.7-1.1 on Ubuntu 13.04 x64 with iPhone 4 with iOs 6.1.3

addressbook.vcf ok in Thunderbird/Sogo

I can get it this close to working but no further. I am using it over SSL with httpd on port 8443, htpasswd (crypt) and debug logging as only non default options set.

2013-08-10 12:44:45,229 - INFO: PROPFIND request at /rfm6/addressbook.vcf/ received
2013-08-10 12:44:45,230 - DEBUG: Request headers:
{'CONTENT_LENGTH': '181',
'CONTENT_TYPE': 'text/xml',
'GATEWAY_INTERFACE': 'CGI/1.1',
'HTTP_ACCEPT': '/',
'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
'HTTP_ACCEPT_LANGUAGE': 'en-us',
'HTTP_AUTHORIZATION': 'Basic cmZtNjpXaHVkIXAwNw==',
'HTTP_BRIEF': 't',
'HTTP_CONNECTION': 'keep-alive',
'HTTP_DEPTH': '0',
'HTTP_HOST': 'webmail.xxxxxxxxxx.com:8443',
'HTTP_USER_AGENT': 'iOS/6.1.3 (10B329) Preferences/1.0',
'PATH_INFO': '/rfm6/addressbook.vcf/',
'QUERY_STRING': '',
'REMOTE_ADDR': 'xx.xxx.xxx.xxx',
'REMOTE_HOST': 'host-xx-xxx-xxx-xxx.as13285.net',
'REQUEST_METHOD': 'PROPFIND',
'SCRIPT_NAME': '',
'SERVER_NAME': 'ubuntu.xxxxxxxxxx.com',
'SERVER_PORT': '8443',
'SERVER_PROTOCOL': 'HTTP/1.1',
'SERVER_SOFTWARE': 'WSGIServer/0.1 Python/2.7.4',
'wsgi.errors': <open file '/dev/null', mode 'w' at 0xb6e0b128>,
'wsgi.file_wrapper': <class wsgiref.util.FileWrapper at 0xb6f70e9c>,
'wsgi.input': <socket._fileobject object at 0xb6e77f2c>,
'wsgi.multiprocess': False,
'wsgi.multithread': True,
'wsgi.run_once': False,
'wsgi.url_scheme': 'http',
'wsgi.version': (1, 0)}
2013-08-10 12:44:45,230 - DEBUG: Sanitized path: /rfm6/addressbook.vcf/
2013-08-10 12:44:45,234 - DEBUG: Request content:

<A:propfind xmlns:A="DAV:">
<A:prop>
<A:current-user-principal/>
<A:principal-URL/>
<A:resourcetype/>
/A:prop
/A:propfind

2013-08-10 12:44:45,234 - INFO: Checking rights for collection owned by rfm6
2013-08-10 12:44:45,234 - INFO: rfm6 allowed
2013-08-10 12:44:45,236 - DEBUG: Response content:

/rfm6/addressbook.vcf/ /rfm6/ /rfm6/addressbook.vcf/ HTTP/1.1 200 OK

2013-08-10 12:44:45,236 - DEBUG: Answer status: 207 Unknown

(nothing after this)

It is missing CS:getctag ? (sorry I only tried setting this up for first time yesterday and still getting my head round it)

Bug with authentification on python 3.2

I had a bug with authorization encoding on python 3.2 and I replaced the code this way to get it working :

file : radicale/__init__.py

271         if authorization:
272             authorization = \
273                 authorization.lstrip("Basic").strip()
274             user, password = base64.b64decode(
275                 authorization.encode("utf-8")).decode("utf-8").split(":", 1)

instead of :

271        if authorization:
272            authorization = \
273                authorization.decode("ascii").lstrip("Basic").strip()
274            user, password = self.decode(base64.b64decode(
275                authorization.encode("ascii")), environ).split(":", 1)

I'm not really sure this is the proper way to do it with Radicale so I just leave that here.

-C is broken for some configuration keys

Some configuration keys are not taken from the right configuration file when -C is used, because some modules are imported before updating the config from the configuration file.

CardDAV-Sync communicate with Radicale too slow

I tried to use CardDAV-Sync with Radicale, it works but very slow. I see the DEBUG log that Radicale print out and find two request from client are always delayed by 5 seconds.

And I also use Wireshark to monitor the same communication, it seems the Radicale side will delay 15 seconds to respond client for a request.

So I'm wondering what happened in Radicale and how can I drop the delay to make the sync not so painful.

2013-11-18 13:50:25,970 - INFO: Starting Radicale hahaha
2013-11-18 13:50:25,970 - DEBUG: Authentication type is htpasswd
2013-11-18 13:50:25,971 - DEBUG: Rights type is owner_only
2013-11-18 13:50:25,973 - DEBUG: Base URL prefix: /
2013-11-18 13:50:25,973 - DEBUG: Listening to yuq-Vostro-270 port 5232
2013-11-18 13:50:25,974 - DEBUG: Radicale server ready
2013-11-18 13:50:51,747 - INFO: PROPFIND request at /admin/address.vcf/ received
2013-11-18 13:50:51,749 - DEBUG: Request headers:
{'CONTENT_LENGTH': '123',
 'CONTENT_TYPE': 'application/xml; charset="utf-8"',
 'GATEWAY_INTERFACE': 'CGI/1.1',
 'HTTP_ACCEPT_ENCODING': 'gzip',
 'HTTP_CACHE_CONTROL': 'no-cache',
 'HTTP_CONNECTION': 'Keep-Alive',
 'HTTP_DEPTH': '0',
 'HTTP_HOST': '192.168.1.123:5232',
 'HTTP_PRAGMA': 'no-cache',
 'HTTP_USER_AGENT': 'CardDAV-Sync (Android) (like iOS/5.0.1 (9A405) dataaccessd/1.0) gzip',
 'PATH_INFO': '/admin/address.vcf/',
 'QUERY_STRING': '',
 'REMOTE_ADDR': '192.168.1.118',
 'REMOTE_HOST': '',
 'REQUEST_METHOD': 'PROPFIND',
 'SCRIPT_NAME': '',
 'SERVER_NAME': 'yuq-Vostro-270',
 'SERVER_PORT': '5232',
 'SERVER_PROTOCOL': 'HTTP/1.1',
 'SERVER_SOFTWARE': 'WSGIServer/0.1 Python/2.7.3',
 'wsgi.errors': <open file '/dev/null', mode 'w' at 0x9820bd0>,
 'wsgi.file_wrapper': <class wsgiref.util.FileWrapper at 0x9768ddc>,
 'wsgi.input': <socket._fileobject object at 0x988102c>,
 'wsgi.multiprocess': False,
 'wsgi.multithread': True,
 'wsgi.run_once': False,
 'wsgi.url_scheme': 'http',
 'wsgi.version': (1, 0)}
2013-11-18 13:50:51,749 - DEBUG: Sanitized path: /admin/address.vcf/
2013-11-18 13:50:51,749 - DEBUG: Request content:
<?xml version="1.0" encoding="utf-8" ?><A:propfind xmlns:A="DAV:"><A:prop><A:current-user-principal/></A:prop></A:propfind>
2013-11-18 13:50:51,750 - INFO: Anonymous user refused
2013-11-18 13:50:51,750 - DEBUG: Answer status: 401 Unauthorized
2013-11-18 13:50:56,889 - INFO: PROPFIND request at /admin/address.vcf/ received
2013-11-18 13:50:56,891 - DEBUG: Request headers:
{'CONTENT_LENGTH': '123',
 'CONTENT_TYPE': 'application/xml; charset="utf-8"',
 'GATEWAY_INTERFACE': 'CGI/1.1',
 'HTTP_ACCEPT_ENCODING': 'gzip',
 'HTTP_AUTHORIZATION': 'Basic YWRtaW46YWRtaW4=',
 'HTTP_CACHE_CONTROL': 'no-cache',
 'HTTP_CONNECTION': 'Keep-Alive',
 'HTTP_DEPTH': '0',
 'HTTP_HOST': '192.168.1.123:5232',
 'HTTP_PRAGMA': 'no-cache',
 'HTTP_USER_AGENT': 'CardDAV-Sync (Android) (like iOS/5.0.1 (9A405) dataaccessd/1.0) gzip',
 'PATH_INFO': '/admin/address.vcf/',
 'QUERY_STRING': '',
 'REMOTE_ADDR': '192.168.1.118',
 'REMOTE_HOST': '',
 'REQUEST_METHOD': 'PROPFIND',
 'SCRIPT_NAME': '',
 'SERVER_NAME': 'yuq-Vostro-270',
 'SERVER_PORT': '5232',
 'SERVER_PROTOCOL': 'HTTP/1.1',
 'SERVER_SOFTWARE': 'WSGIServer/0.1 Python/2.7.3',
 'wsgi.errors': <open file '/dev/null', mode 'w' at 0x9820bd0>,
 'wsgi.file_wrapper': <class wsgiref.util.FileWrapper at 0x9768ddc>,
 'wsgi.input': <socket._fileobject object at 0x988102c>,
 'wsgi.multiprocess': False,
 'wsgi.multithread': True,
 'wsgi.run_once': False,
 'wsgi.url_scheme': 'http',
 'wsgi.version': (1, 0)}
2013-11-18 13:50:56,891 - DEBUG: Sanitized path: /admin/address.vcf/
2013-11-18 13:50:56,891 - DEBUG: Request content:
<?xml version="1.0" encoding="utf-8" ?><A:propfind xmlns:A="DAV:"><A:prop><A:current-user-principal/></A:prop></A:propfind>
2013-11-18 13:50:56,892 - DEBUG: admin has read access to collection admin/address.vcf/
2013-11-18 13:50:56,892 - DEBUG: admin has write access to collection admin/address.vcf/
2013-11-18 13:50:56,894 - DEBUG: Response content:
<?xml version="1.0"?>
<multistatus xmlns="DAV:">
  <response>
    <href>/admin/address.vcf/</href>
    <propstat>
      <prop>
        <current-user-principal>
          <href>/admin/</href>
        </current-user-principal>
      </prop>
      <status>HTTP/1.1 200 OK</status>
    </propstat>
  </response>
</multistatus>

2013-11-18 13:50:56,894 - DEBUG: Answer status: 207 Unknown

screenshot from 2013-11-18 15 00 51

External calendar sync

Hi

Sorry for the title, I don't know how name it. I talk about regularly pull a distant calendar into the radicale instance. My university permit us to get our schedule online, so I would like to create a read-only calendar filled and updated from an URL. Is it possible ?

Thanks for your amazing software.

Support SSL options

Currently, Radicale is using ssl_version=ssl.PROTOCOL_SSLv23 to set TLS/SSL protocol. This may leave SSLv2 enabled, unless disabled somewhere.

I would like to be able to specify in the config file which protocols to use, for example only allow TLSv1.1 and TLSv1.2 and which ciphers to use (for example ECDHE-ECDSA-AES256-GCM-SHA384).

There is no (useful) documentation

After wasting a whole day (!) trying to set this damn thing up I give up.

The problem is: The docs are a bad joke, especially that thing called “user documentation”.

Just a few things:

  • What can you do with the server? What does it do for you?
  • Where (and how) are the calendar files saved?
  • How can I use already existing calendar files?
  • I want to configure first before I connect the client.
  • Where should I start Radicale? After trying for hours I found out that the DAMN FOLDER MATTERS!
  • What the hell does the base_prefix do?
  • How does IMAP auth work? It’s a mystery.
  • When can I be sure that it’s the fault of my client and not some misconfiguration of Radicale? That the server doesn’t give any useful hints doesn’t help. That most clients are plain shit doesn’t, either.

I’m so frustrated, I could scream.
This stuff should be EASY. I know that you aren’t responsible for 99% of the crap that is going on with ShitDAV, but you could help make this a lot more “user”-friendly (replace “user” with “Archlinux-Junkie who normally knows his shit”).

Unicode errors

I've seen these in the output, isn't unicode supported ?

UnicodeEncodeError: 'ascii' codec can't encode character '\xc2' in position 175: ordinal not in range(128)
Logged from file init.py, line 267
Traceback (most recent call last):
File "/usr/lib/python3.3/logging/init.py", line 939, in emit
stream.write(msg)
UnicodeEncodeError: 'ascii' codec can't encode character '\xc2' in position 208: ordinal not in range(128)
Logged from file init.py, line 267

IPv4 + IPv6 support (at the same time)

It doesn't seem to be possible to use IPv6 and IPv4 at the same time. Using either on its own works fine.

Can you add support to enable to both at the same time?

Open storage and auth backends

The backends for storage and authentication are kind of closed to the ones you implemented in radicale.storage and radicale.auth with the settings that map to the module name inside of this packages.

I thought about writing a storage and auth backend for integration with django. i don't think that this glueing integration code belong into radicale's codebase.

what do you think about opening up this restriction by making it possible to define a custom module path to the storage or auth backend.

About iphone carddav connect Radicale.

 Hi, guys.I want to use iphone sync carddav with Radicale(0.8).But it can't work.Has anyone ideas for this?And has anybody been debugging for this?Have any questions If i will be debugging ? 
  Thanks.

mysql schema

I would like to use mysql for the backend database and modifed the postgres schema for mysql syntax. I am able to create events, but results for REPORT request do not include the events.

Here is the radicale log
[Mon Nov 18 17:14:40 2013] [error] REPORT request at /[email protected]/calendar.ics/ received
[Mon Nov 18 17:14:40 2013] [error] Request headers:
[Mon Nov 18 17:14:40 2013] [error] {'CONTENT_LENGTH': '408',
[Mon Nov 18 17:14:40 2013] [error] 'CONTENT_TYPE': 'application/xml',
[Mon Nov 18 17:14:40 2013] [error] 'DOCUMENT_ROOT': '/var/www/html',
[Mon Nov 18 17:14:40 2013] [error] 'GATEWAY_INTERFACE': 'CGI/1.1',
[Mon Nov 18 17:14:40 2013] [error] 'HTTP_ACCEPT': '/',
[Mon Nov 18 17:14:40 2013] [error] 'HTTP_HOST': 'radicale.local',
[Mon Nov 18 17:14:40 2013] [error] 'HTTP_USER_AGENT': 'Ruby',
[Mon Nov 18 17:14:40 2013] [error] 'PATH_INFO': '/[email protected]/calendar.ics/',
[Mon Nov 18 17:14:40 2013] [error] 'PATH_TRANSLATED': '/var/www/radicale.wsgi/[email protected]/calendar.ics/',
[Mon Nov 18 17:14:40 2013] [error] 'QUERY_STRING': '',
[Mon Nov 18 17:14:40 2013] [error] 'REMOTE_ADDR': '192.168.0.7',
[Mon Nov 18 17:14:40 2013] [error] 'REMOTE_PORT': '50800',
[Mon Nov 18 17:14:40 2013] [error] 'REQUEST_METHOD': 'REPORT',
[Mon Nov 18 17:14:40 2013] [error] 'REQUEST_URI': '/[email protected]/calendar.ics/',
[Mon Nov 18 17:14:40 2013] [error] 'SCRIPT_FILENAME': '/var/www/radicale.wsgi',
[Mon Nov 18 17:14:40 2013] [error] 'SCRIPT_NAME': '',
[Mon Nov 18 17:14:40 2013] [error] 'SERVER_ADDR': '192.168.0.33',
[Mon Nov 18 17:14:40 2013] [error] 'SERVER_ADMIN': 'root@localhost',
[Mon Nov 18 17:14:40 2013] [error] 'SERVER_NAME': 'radicale.local',
[Mon Nov 18 17:14:40 2013] [error] 'SERVER_PORT': '80',
[Mon Nov 18 17:14:40 2013] [error] 'SERVER_PROTOCOL': 'HTTP/1.1',
[Mon Nov 18 17:14:40 2013] [error] 'SERVER_SIGNATURE': '

Apache/2.2.15 (CentOS) Server at radicale.local Port 80\n',
[Mon Nov 18 17:14:40 2013] [error] 'SERVER_SOFTWARE': 'Apache/2.2.15 (CentOS)',
[Mon Nov 18 17:14:40 2013] [error] 'mod_wsgi.application_group': '',
[Mon Nov 18 17:14:40 2013] [error] 'mod_wsgi.callable_object': 'application',
[Mon Nov 18 17:14:40 2013] [error] 'mod_wsgi.handler_script': '',
[Mon Nov 18 17:14:40 2013] [error] 'mod_wsgi.input_chunked': '0',
[Mon Nov 18 17:14:40 2013] [error] 'mod_wsgi.listener_host': '',
[Mon Nov 18 17:14:40 2013] [error] 'mod_wsgi.listener_port': '80',
[Mon Nov 18 17:14:40 2013] [error] 'mod_wsgi.process_group': 'radicale',
[Mon Nov 18 17:14:40 2013] [error] 'mod_wsgi.request_handler': 'wsgi-script',
[Mon Nov 18 17:14:40 2013] [error] 'mod_wsgi.script_reloading': '1',
[Mon Nov 18 17:14:40 2013] [error] 'mod_wsgi.version': (3, 2),
[Mon Nov 18 17:14:40 2013] [error] 'wsgi.errors': <mod_wsgi.Log object at 0x7ffc5cb47330>,
[Mon Nov 18 17:14:40 2013] [error] 'wsgi.file_wrapper': <built-in method file_wrapper of mod_wsgi.Adapter object at 0x7ffc6e8b93f0>,
[Mon Nov 18 17:14:40 2013] [error] 'wsgi.input': <mod_wsgi.Input object at 0x7ffc6e8c4d70>,
[Mon Nov 18 17:14:40 2013] [error] 'wsgi.multiprocess': False,
[Mon Nov 18 17:14:40 2013] [error] 'wsgi.multithread': False,
[Mon Nov 18 17:14:40 2013] [error] 'wsgi.run_once': False,
[Mon Nov 18 17:14:40 2013] [error] 'wsgi.url_scheme': 'http',
[Mon Nov 18 17:14:40 2013] [error] 'wsgi.version': (1, 1)}
[Mon Nov 18 17:14:40 2013] [error] Sanitized path: /[email protected]/calendar.ics/
[Mon Nov 18 17:14:40 2013] [error] Request content:
[Mon Nov 18 17:14:40 2013] [error]
[Mon Nov 18 17:14:40 2013] [error] <c:calendar-query xmlns:d="DAV:" xmlns:c="urn:ietf:params:xml:ns:caldav">
[Mon Nov 18 17:14:40 2013] [error] <d:prop>
[Mon Nov 18 17:14:40 2013] [error] <d:getetag/>
[Mon Nov 18 17:14:40 2013] [error] <c:calendar-data/>
[Mon Nov 18 17:14:40 2013] [error] /d:prop
[Mon Nov 18 17:14:40 2013] [error] <c:filter>
[Mon Nov 18 17:14:40 2013] [error] <c:comp-filter name="VCALENDAR">
[Mon Nov 18 17:14:40 2013] [error] <c:comp-filter name="VEVENT">
[Mon Nov 18 17:14:40 2013] [error] <c:time-range start="20131027T0000Z" end="20131208T0000Z"/>
[Mon Nov 18 17:14:40 2013] [error] /c:comp-filter
[Mon Nov 18 17:14:40 2013] [error] /c:comp-filter
[Mon Nov 18 17:14:40 2013] [error] /c:filter
[Mon Nov 18 17:14:40 2013] [error] /c:calendar-query
[Mon Nov 18 17:14:40 2013] [error]
[Mon Nov 18 17:14:40 2013] [error] Anonymous has read access to collection [email protected]/calendar.ics/
[Mon Nov 18 17:14:40 2013] [error] Anonymous has write access to collection [email protected]/calendar.ics/
[Mon Nov 18 17:14:40 2013] [error] Response content:
[Mon Nov 18 17:14:40 2013] [error]
[Mon Nov 18 17:14:40 2013] [error] <D:multistatus xmlns:D="DAV:">
[Mon Nov 18 17:14:40 2013] [error] <D:response>
[Mon Nov 18 17:14:40 2013] [error] <D:href>/[email protected]/calendar.ics/2d6ae7e0-34e4-0131-ccfd-002500cf9534.ics/D:href
[Mon Nov 18 17:14:40 2013] [error] <D:propstat>
[Mon Nov 18 17:14:40 2013] [error] <D:prop>
[Mon Nov 18 17:14:40 2013] [error] <D:getetag>"6cb39d1563a0f64fed4a0f8db1c5808c"/D:getetag
[Mon Nov 18 17:14:40 2013] [error] <C:calendar-data xmlns:C="urn:ietf:params:xml:ns:caldav">BEGIN:VCALENDAR
[Mon Nov 18 17:14:40 2013] [error] PRODID:-//Radicale//NONSGML Radicale Server//EN
[Mon Nov 18 17:14:40 2013] [error] VERSION:2.0
[Mon Nov 18 17:14:40 2013] [error] BEGIN:VEVENT
[Mon Nov 18 17:14:40 2013] [error] END:VCALENDAR
[Mon Nov 18 17:14:40 2013] [error] /C:calendar-data
[Mon Nov 18 17:14:40 2013] [error] /D:prop
[Mon Nov 18 17:14:40 2013] [error] <D:status>HTTP/1.1 200 OK/D:status
[Mon Nov 18 17:14:40 2013] [error] /D:propstat
[Mon Nov 18 17:14:40 2013] [error] /D:response
[Mon Nov 18 17:14:40 2013] [error] /D:multistatus
[Mon Nov 18 17:14:40 2013] [error]
[Mon Nov 18 17:14:40 2013] [error] Answer status: 207 Unknown

here is the mysql schema
-- This is the database schema for MySQL
SET SESSION SQL_MODE='ANSI';

drop table if exists collection;
create table collection (
path varchar(255) not null,
parent_path varchar(255) not null,
primary key (path)
)ENGINE=INNODB,CHARACTER SET=utf8;

drop table if exists item;
create table item (
name varchar(255) not null,
tag varchar(255) not null,
collection_path varchar(255),
foreign key (collection_path) references collection(path) ON UPDATE CASCADE ON DELETE cascade,
primary key (name))ENGINE=INNODB ,CHARACTER SET=utf8;

drop table if exists header;
create table header (
key varchar(255) not null,
value varchar(255) not null,
collection_path varchar(255) references collection(path) ON UPDATE CASCADE ON DELETE cascade
) ENGINE=INNODB,CHARACTER SET=utf8;

drop table if exists line;
create table line (
key varchar(255) not null,
value varchar(255) not null,
item_name varchar(255),
foreign key (item_name) references item(name),
timestamp timestamp not null)ENGINE=INNODB,CHARACTER SET=utf8;

drop table if exists property;
create table property (
key varchar(255) not null,
value varchar(255) not null,
collection_path varchar(255),
foreign key (collection_path) references collection (path) ON UPDATE CASCADE ON DELETE cascade,
primary key property_key_collection_path (key, collection_path))ENGINE=INNODB,CHARACTER SET=utf8;

Run external script(s) on insert/delete/modify

Hey guys!
Great work, fantastic server, works really well!

Just a "small" request:
It would be great to be able to call an external python script when something added/deleted/modified in a calendar.

This would allow others to devel notifications/events that can be triggered when when stuff happens.

For example: With a shared calendar, it might be good to write a notification script that emails users a message " has added a new event 'Office christmas party' in calendar office.ics", or " has modified 'Office christmas party' in calendar office.ics".

Possibly out of scope (this is starting to get in to client land): Periodically scan (even via external app such as cron?) the calendar for enabled notifications and trigger a script - for example, if a notification is due at 4pm trigger a user generated notify.py script, pass the calendar entry so an SMS can be sent via a web service...

Anyway guys, love the progress, very stable and nice.

Cheers,
ObM.
(PS: Running on ubuntu 12.10 with Apache front end, using PAM for Apache auth).

Thunderbird/Lightning fails to add/modify events (Radicale 0.7)

[EDIT] After further investigation, I have changed the title and updated the information.

Hi,

I am opening this issue following the discussion in issue #71.

Summary:
Thunderbird/Lightning works OK when a new calendar is created from a URL with no trailing slash but gives errors when the calendar is created from a URL with a trailing slash.

This may as well be a bug in Thunderbird/Lightning, but radicale should not create a calendar if the submitted url does not end with a trailing slash.

Radicale version: 0.7
Thunderbird version: 24
Lightning version: 2.6b3

Description (r: radicale on server; t: thunderbird on client)

# TEST 1

r: stop
r: no auth, no ssl, debug on
r: clean collections dir
t: start
t: delete all calendars
r: start
t: add http://myserver:5232/myuser/cal1.ics/ (with trailing slash)
r: Answer status: 200 OK
r: collections/myuser/ contains two files: cal1.ics and cal1.ics.props
t: add "New Event" to cal1
r: Answer status: 200 OK
r: collections/myuser/cal1.ics contains "New Event"
t: MODIFICATION_FAILED error
t: Cannot use cal1
t: add http://myserver:5232/myuser/cal2.ics (with NO trailing slash)
r: Answer status: 410 Gone
r: nothing new in collections/myuser
t: add "New Event" to cal2
t: MODIFICATION_FAILED error
t: Cannot use cal2
r: Answer status: 410 Gone
r: nothing new in collections/myuser

# TEST 2

r: stop
r: no auth, no ssl, debug on
r: clean collections dir
r: start
t: delete all calendars
t: add http://myserver:5232/myuser/cal3.ics (with NO trailing slash)
r: Answer status: 410 Gone
r: nothing new in collections
t: add "New Event" to cal3
r: Answer status: 201 Created
r: collections contains 2 files: myuser (VCALENDAR) and myuser.props
t: works OK, can modify/add/remove events
t: add http://myserver:5232/myuser/cal4.ics/ (with trailing slash)
r: no Answer status in logs
r: nothing new in collections
t: add "New Event" to cal4
t: MODIFICATION_FAILED error
t: Cannot use cal4
r: no Answer status in logs
r: nothing new in collections

OSx Calendar and iOS Calendar database storages on PROPFIND

I am using latest radicale with storage = database (postgres). I'm using the latest schema.sql. With Mozilla lightning I can sync events but with OSX (10.8.5) and iOS (7.0.1) there is an exception from the first propfind request.

I also removed the primary key from the header table but that didn't help.

[Mon Nov 18 16:49:38 2013] [error] PROPFIND request at /[email protected]/calendar.ics/ received
[Mon Nov 18 16:49:38 2013] [error] Request headers:
[Mon Nov 18 16:49:38 2013] [error] {'CONTENT_LENGTH': '2097',
[Mon Nov 18 16:49:38 2013] [error]  'CONTENT_TYPE': 'text/xml',
[Mon Nov 18 16:49:38 2013] [error]  'DOCUMENT_ROOT': '/var/www/html',
[Mon Nov 18 16:49:38 2013] [error]  'GATEWAY_INTERFACE': 'CGI/1.1',
[Mon Nov 18 16:49:38 2013] [error]  'HTTP_ACCEPT': '*/*',
[Mon Nov 18 16:49:38 2013] [error]  'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
[Mon Nov 18 16:49:38 2013] [error]  'HTTP_ACCEPT_LANGUAGE': 'en-us',
[Mon Nov 18 16:49:38 2013] [error]  'HTTP_BRIEF': 't',
[Mon Nov 18 16:49:38 2013] [error]  'HTTP_CONNECTION': 'keep-alive',
[Mon Nov 18 16:49:38 2013] [error]  'HTTP_DEPTH': '1',
[Mon Nov 18 16:49:38 2013] [error]  'HTTP_HOST': '192.168.0.33',
[Mon Nov 18 16:49:38 2013] [error]  'HTTP_PREFER': 'return-minimal',
[Mon Nov 18 16:49:38 2013] [error]  'HTTP_USER_AGENT': 'iOS/7.0.2 (11A501) dataaccessd/1.0',
[Mon Nov 18 16:49:38 2013] [error]  'PATH_INFO': '/[email protected]/calendar.ics/',
[Mon Nov 18 16:49:38 2013] [error]  'PATH_TRANSLATED': '/var/www/radicale.wsgi/[email protected]/calendar.ics/',
[Mon Nov 18 16:49:38 2013] [error]  'QUERY_STRING': '',
[Mon Nov 18 16:49:38 2013] [error]  'REMOTE_ADDR': '192.168.0.3',
[Mon Nov 18 16:49:38 2013] [error]  'REMOTE_PORT': '54891',
[Mon Nov 18 16:49:38 2013] [error]  'REQUEST_METHOD': 'PROPFIND',
[Mon Nov 18 16:49:38 2013] [error]  'REQUEST_URI': '/curt%40curt.com/calendar.ics/',
[Mon Nov 18 16:49:38 2013] [error]  'SCRIPT_FILENAME': '/var/www/radicale.wsgi',
[Mon Nov 18 16:49:38 2013] [error]  'SCRIPT_NAME': '',
[Mon Nov 18 16:49:38 2013] [error]  'SERVER_ADDR': '192.168.0.33',
[Mon Nov 18 16:49:38 2013] [error]  'SERVER_ADMIN': 'root@localhost',
[Mon Nov 18 16:49:38 2013] [error]  'SERVER_NAME': '192.168.0.33',
[Mon Nov 18 16:49:38 2013] [error]  'SERVER_PORT': '80',
[Mon Nov 18 16:49:38 2013] [error]  'SERVER_PROTOCOL': 'HTTP/1.1',
[Mon Nov 18 16:49:38 2013] [error]  'SERVER_SIGNATURE': '<address>Apache/2.2.15 (CentOS) Server at 192.168.0.33 Port 80</address>\\n',
[Mon Nov 18 16:49:38 2013] [error]  'SERVER_SOFTWARE': 'Apache/2.2.15 (CentOS)',
[Mon Nov 18 16:49:38 2013] [error]  'mod_wsgi.application_group': '',
[Mon Nov 18 16:49:38 2013] [error]  'mod_wsgi.callable_object': 'application',
[Mon Nov 18 16:49:38 2013] [error]  'mod_wsgi.handler_script': '',
[Mon Nov 18 16:49:38 2013] [error]  'mod_wsgi.input_chunked': '0',
[Mon Nov 18 16:49:38 2013] [error]  'mod_wsgi.listener_host': '',
[Mon Nov 18 16:49:38 2013] [error]  'mod_wsgi.listener_port': '80',
[Mon Nov 18 16:49:38 2013] [error]  'mod_wsgi.process_group': 'radicale',
[Mon Nov 18 16:49:38 2013] [error]  'mod_wsgi.request_handler': 'wsgi-script',
[Mon Nov 18 16:49:38 2013] [error]  'mod_wsgi.script_reloading': '1',
[Mon Nov 18 16:49:38 2013] [error]  'mod_wsgi.version': (3, 2),
[Mon Nov 18 16:49:38 2013] [error]  'wsgi.errors': <mod_wsgi.Log object at 0x7f63b8c5d3b0>,
[Mon Nov 18 16:49:38 2013] [error]  'wsgi.file_wrapper': <built-in method file_wrapper of mod_wsgi.Adapter object at 0x7f63cb7953f0>,
[Mon Nov 18 16:49:38 2013] [error]  'wsgi.input': <mod_wsgi.Input object at 0x7f63b8c340f0>,
[Mon Nov 18 16:49:38 2013] [error]  'wsgi.multiprocess': False,
[Mon Nov 18 16:49:38 2013] [error]  'wsgi.multithread': False,
[Mon Nov 18 16:49:38 2013] [error]  'wsgi.run_once': False,
[Mon Nov 18 16:49:38 2013] [error]  'wsgi.url_scheme': 'http',
[Mon Nov 18 16:49:38 2013] [error]  'wsgi.version': (1, 1)}
[Mon Nov 18 16:49:38 2013] [error] Sanitized path: /[email protected]/calendar.ics/
[Mon Nov 18 16:49:38 2013] [error] Request content:
[Mon Nov 18 16:49:38 2013] [error] <?xml version="1.0" encoding="UTF-8"?>
[Mon Nov 18 16:49:38 2013] [error] <A:propfind xmlns:A="DAV:">
[Mon Nov 18 16:49:38 2013] [error]   <A:prop>
[Mon Nov 18 16:49:38 2013] [error]     <A:add-member/>
[Mon Nov 18 16:49:38 2013] [error]     <C:allowed-sharing-modes xmlns:C="http://calendarserver.org/ns/"/>
[Mon Nov 18 16:49:38 2013] [error]     <H:autoprovisioned xmlns:H="http://apple.com/ns/ical/"/>
[Mon Nov 18 16:49:38 2013] [error]     <E:bulk-requests xmlns:E="http://me.com/_namespace/"/>
[Mon Nov 18 16:49:38 2013] [error]     <H:calendar-color xmlns:H="http://apple.com/ns/ical/"/>
[Mon Nov 18 16:49:38 2013] [error]     <B:calendar-description xmlns:B="urn:ietf:params:xml:ns:caldav"/>
[Mon Nov 18 16:49:38 2013] [error]     <B:calendar-free-busy-set xmlns:B="urn:ietf:params:xml:ns:caldav"/>
[Mon Nov 18 16:49:38 2013] [error]     <H:calendar-order xmlns:H="http://apple.com/ns/ical/"/>
[Mon Nov 18 16:49:38 2013] [error]     <B:calendar-timezone xmlns:B="urn:ietf:params:xml:ns:caldav"/>
[Mon Nov 18 16:49:38 2013] [error]     <A:current-user-privilege-set/>
[Mon Nov 18 16:49:38 2013] [error]     <B:default-alarm-vevent-date xmlns:B="urn:ietf:params:xml:ns:caldav"/>
[Mon Nov 18 16:49:38 2013] [error]     <B:default-alarm-vevent-datetime xmlns:B="urn:ietf:params:xml:ns:caldav"/>
[Mon Nov 18 16:49:38 2013] [error]     <A:displayname/>
[Mon Nov 18 16:49:38 2013] [error]     <C:getctag xmlns:C="http://calendarserver.org/ns/"/>
[Mon Nov 18 16:49:38 2013] [error]     <H:language-code xmlns:H="http://apple.com/ns/ical/"/>
[Mon Nov 18 16:49:38 2013] [error]     <H:location-code xmlns:H="http://apple.com/ns/ical/"/>
[Mon Nov 18 16:49:38 2013] [error]     <A:owner/>
[Mon Nov 18 16:49:38 2013] [error]     <C:pre-publish-url xmlns:C="http://calendarserver.org/ns/"/>
[Mon Nov 18 16:49:38 2013] [error]     <C:publish-url xmlns:C="http://calendarserver.org/ns/"/>
[Mon Nov 18 16:49:38 2013] [error]     <C:push-transports xmlns:C="http://calendarserver.org/ns/"/>
[Mon Nov 18 16:49:38 2013] [error]     <C:pushkey xmlns:C="http://calendarserver.org/ns/"/>
[Mon Nov 18 16:49:38 2013] [error]     <A:quota-available-bytes/>
[Mon Nov 18 16:49:38 2013] [error]     <A:quota-used-bytes/>
[Mon Nov 18 16:49:38 2013] [error]     <H:refreshrate xmlns:H="http://apple.com/ns/ical/"/>
[Mon Nov 18 16:49:38 2013] [error]     <A:resource-id/>
[Mon Nov 18 16:49:38 2013] [error]     <A:resourcetype/>
[Mon Nov 18 16:49:38 2013] [error]     <B:schedule-calendar-transp xmlns:B="urn:ietf:params:xml:ns:caldav"/>
[Mon Nov 18 16:49:38 2013] [error]     <B:schedule-default-calendar-URL xmlns:B="urn:ietf:params:xml:ns:caldav"/>
[Mon Nov 18 16:49:38 2013] [error]     <C:source xmlns:C="http://calendarserver.org/ns/"/>
[Mon Nov 18 16:49:38 2013] [error]     <C:subscribed-strip-alarms xmlns:C="http://calendarserver.org/ns/"/>
[Mon Nov 18 16:49:38 2013] [error]     <C:subscribed-strip-attachments xmlns:C="http://calendarserver.org/ns/"/>
[Mon Nov 18 16:49:38 2013] [error]     <C:subscribed-strip-todos xmlns:C="http://calendarserver.org/ns/"/>
[Mon Nov 18 16:49:38 2013] [error]     <B:supported-calendar-component-set xmlns:B="urn:ietf:params:xml:ns:caldav"/>
[Mon Nov 18 16:49:38 2013] [error]     <B:supported-calendar-component-sets xmlns:B="urn:ietf:params:xml:ns:caldav"/>
[Mon Nov 18 16:49:38 2013] [error]     <A:supported-report-set/>
[Mon Nov 18 16:49:38 2013] [error]     <A:sync-token/>
[Mon Nov 18 16:49:38 2013] [error]   </A:prop>
[Mon Nov 18 16:49:38 2013] [error] </A:propfind>
[Mon Nov 18 16:49:38 2013] [error] 
[Mon Nov 18 16:49:38 2013] [error] Anonymous has read access to collection [email protected]/calendar.ics/
[Mon Nov 18 16:49:38 2013] [error] Anonymous has write access to collection [email protected]/calendar.ics/
[Mon Nov 18 16:49:38 2013] [error] Anonymous has read access to item 06797930-34dd-0131-ccf7-002500cf9534.ics
[Mon Nov 18 16:49:38 2013] [error] Anonymous has write access to item 06797930-34dd-0131-ccf7-002500cf9534.ics
[Mon Nov 18 16:49:38 2013] [error] Anonymous has read access to item 105deeb9-b05e-e745-9a15-85c2bbd85012.ics
[Mon Nov 18 16:49:38 2013] [error] Anonymous has write access to item 105deeb9-b05e-e745-9a15-85c2bbd85012.ics
[Mon Nov 18 16:49:38 2013] [error] Anonymous has read access to item 52ff1080-34dd-0131-ccf8-002500cf9534.ics
[Mon Nov 18 16:49:38 2013] [error] Anonymous has write access to item 52ff1080-34dd-0131-ccf8-002500cf9534.ics
[Mon Nov 18 16:49:38 2013] [error] Anonymous has read access to item 56948f90-34de-0131-ccfc-002500cf9534.ics
[Mon Nov 18 16:49:38 2013] [error] Anonymous has write access to item 56948f90-34de-0131-ccfc-002500cf9534.ics
[Mon Nov 18 16:49:38 2013] [error] Anonymous has read access to item 7f2b9c90-34dd-0131-ccf9-002500cf9534.ics
[Mon Nov 18 16:49:38 2013] [error] Anonymous has write access to item 7f2b9c90-34dd-0131-ccf9-002500cf9534.ics
[Mon Nov 18 16:49:38 2013] [error] Anonymous has read access to item 900796a0-34dd-0131-ccfa-002500cf9534.ics
[Mon Nov 18 16:49:38 2013] [error] Anonymous has write access to item 900796a0-34dd-0131-ccfa-002500cf9534.ics
[Mon Nov 18 16:49:38 2013] [error] [client 192.168.0.3] mod_wsgi (pid=4648): Exception occurred processing WSGI script '/var/www/radicale.wsgi'.
[Mon Nov 18 16:49:38 2013] [error] [client 192.168.0.3] Traceback (most recent call last):
[Mon Nov 18 16:49:38 2013] [error] [client 192.168.0.3]   File "/usr/lib/python2.6/site-packages/radicale/__init__.py", line 289, in __call__
[Mon Nov 18 16:49:38 2013] [error] [client 192.168.0.3]     user)
[Mon Nov 18 16:49:38 2013] [error] [client 192.168.0.3]   File "/usr/lib/python2.6/site-packages/radicale/__init__.py", line 502, in propfind
[Mon Nov 18 16:49:38 2013] [error] [client 192.168.0.3]     environ["PATH_INFO"], content, collections, user)
[Mon Nov 18 16:49:38 2013] [error] [client 192.168.0.3]   File "/usr/lib/python2.6/site-packages/radicale/xmlutils.py", line 237, in propfind
[Mon Nov 18 16:49:38 2013] [error] [client 192.168.0.3]     response = _propfind_response(path, collection, props, user)
[Mon Nov 18 16:49:38 2013] [error] [client 192.168.0.3]   File "/usr/lib/python2.6/site-packages/radicale/xmlutils.py", line 342, in _propfind_response
[Mon Nov 18 16:49:38 2013] [error] [client 192.168.0.3]     item.tag, item.headers, item.timezones)
[Mon Nov 18 16:49:38 2013] [error] [client 192.168.0.3]   File "/usr/lib/python2.6/site-packages/radicale/ical.py", line 408, in tag
[Mon Nov 18 16:49:38 2013] [error] [client 192.168.0.3]     with self.props as props:
[Mon Nov 18 16:49:38 2013] [error] [client 192.168.0.3]   File "/usr/lib64/python2.6/contextlib.py", line 16, in __enter__
[Mon Nov 18 16:49:38 2013] [error] [client 192.168.0.3]     return self.gen.next()
[Mon Nov 18 16:49:38 2013] [error] [client 192.168.0.3]   File "/usr/lib/python2.6/site-packages/radicale/storage/database.py", line 239, in props
[Mon Nov 18 16:49:38 2013] [error] [client 192.168.0.3]     .filter_by(collection_path=self.path).all())
[Mon Nov 18 16:49:38 2013] [error] [client 192.168.0.3]   File "/usr/lib/python2.6/site-packages/sqlalchemy/orm/query.py", line 2241, in all
[Mon Nov 18 16:49:38 2013] [error] [client 192.168.0.3]     return list(self)
[Mon Nov 18 16:49:38 2013] [error] [client 192.168.0.3]   File "/usr/lib/python2.6/site-packages/sqlalchemy/orm/query.py", line 2352, in __iter__
[Mon Nov 18 16:49:38 2013] [error] [client 192.168.0.3]     self.session._autoflush()
[Mon Nov 18 16:49:38 2013] [error] [client 192.168.0.3]   File "/usr/lib/python2.6/site-packages/sqlalchemy/orm/session.py", line 1139, in _autoflush
[Mon Nov 18 16:49:38 2013] [error] [client 192.168.0.3]     self.flush()
[Mon Nov 18 16:49:38 2013] [error] [client 192.168.0.3]   File "/usr/lib/python2.6/site-packages/sqlalchemy/orm/session.py", line 1818, in flush
[Mon Nov 18 16:49:38 2013] [error] [client 192.168.0.3]     self._flush(objects)
[Mon Nov 18 16:49:38 2013] [error] [client 192.168.0.3]   File "/usr/lib/python2.6/site-packages/sqlalchemy/orm/session.py", line 1936, in _flush
[Mon Nov 18 16:49:38 2013] [error] [client 192.168.0.3]     transaction.rollback(_capture_exception=True)
[Mon Nov 18 16:49:38 2013] [error] [client 192.168.0.3]   File "/usr/lib/python2.6/site-packages/sqlalchemy/util/langhelpers.py", line 58, in __exit__
[Mon Nov 18 16:49:38 2013] [error] [client 192.168.0.3]     compat.reraise(exc_type, exc_value, exc_tb)
[Mon Nov 18 16:49:38 2013] [error] [client 192.168.0.3]   File "/usr/lib/python2.6/site-packages/sqlalchemy/orm/session.py", line 1900, in _flush
[Mon Nov 18 16:49:38 2013] [error] [client 192.168.0.3]     flush_context.execute()
[Mon Nov 18 16:49:38 2013] [error] [client 192.168.0.3]   File "/usr/lib/python2.6/site-packages/sqlalchemy/orm/unitofwork.py", line 372, in execute
[Mon Nov 18 16:49:38 2013] [error] [client 192.168.0.3]     rec.execute(self)
[Mon Nov 18 16:49:38 2013] [error] [client 192.168.0.3]   File "/usr/lib/python2.6/site-packages/sqlalchemy/orm/unitofwork.py", line 479, in execute
[Mon Nov 18 16:49:38 2013] [error] [client 192.168.0.3]     self.dependency_processor.process_deletes(uow, states)
[Mon Nov 18 16:49:38 2013] [error] [client 192.168.0.3]   File "/usr/lib/python2.6/site-packages/sqlalchemy/orm/dependency.py", line 524, in process_deletes
[Mon Nov 18 16:49:38 2013] [error] [client 192.168.0.3]     uowcommit, False)
[Mon Nov 18 16:49:38 2013] [error] [client 192.168.0.3]   File "/usr/lib/python2.6/site-packages/sqlalchemy/orm/dependency.py", line 569, in _synchronize
[Mon Nov 18 16:49:38 2013] [error] [client 192.168.0.3]     sync.clear(dest, self.mapper, self.prop.synchronize_pairs)
[Mon Nov 18 16:49:38 2013] [error] [client 192.168.0.3]   File "/usr/lib/python2.6/site-packages/sqlalchemy/orm/sync.py", line 53, in clear
[Mon Nov 18 16:49:38 2013] [error] [client 192.168.0.3]     (r, orm_util.state_str(dest))
[Mon Nov 18 16:49:38 2013] [error] [client 192.168.0.3] AssertionError: Dependency rule tried to blank-out primary key column 'header.collection_path' on instance '<DBHeader at 0x7f63b82b7e10>'
[Mon Nov 18 16:49:38 2013] [error] Exception sqlalchemy.exc.InvalidRequestError: InvalidRequestError("This Session's transaction has been rolled back due to a previous exception during flush. To begin a new transaction with this Session, first issue Session.rollback(). Original exception was: Dependency rule tried to blank-out primary key column 'header.collection_path' on instance '<DBHeader at 0x7f63b82b7e10>'",) in <bound method Collection.__del__ of <radicale.storage.database.Collection object at 0x7f63b82c2690>> ignored

Support WebDAV synchronization

As explained in the RFC:

This specification defines an extension to Web Distributed Authoring and Versioning (WebDAV) that allows efficient synchronization of the contents of a WebDAV collection.

This draft seems to be implemented in most of the clients.

DAVdroid not connecting

I am running DAVdroid 0.5.4 on Android 4.4 and Radicale 0.7 on Raspbian.

When I try to add my Radicale account to DAVdroid, it fails with a path not found error and the following log:

...
2014-01-01 16:04:34,426 - INFO: OPTIONS request at /felix/ received
2014-01-01 16:04:34,478 - DEBUG: Request headers:
{'CONTENT_LENGTH': '',
'CONTENT_TYPE': 'text/plain',
'GATEWAY_INTERFACE': 'CGI/1.1',
'HTTP_ACCEPT_ENCODING': 'gzip',
'HTTP_CONNECTION': 'Keep-Alive',
'HTTP_HOST': '192.168.1.5:5232',
'HTTP_USER_AGENT': 'DAVdroid/0.5.4-alpha',
'PATH_INFO': '/felix/',
'QUERY_STRING': '',
'REMOTE_ADDR': '192.168.1.21',
'REMOTE_HOST': '',
'REQUEST_METHOD': 'OPTIONS',
'SCRIPT_NAME': '',
'SERVER_NAME': 'raspberrypi',
'SERVER_PORT': '5232',
'SERVER_PROTOCOL': 'HTTP/1.1',
'SERVER_SOFTWARE': 'WSGIServer/0.1 Python/2.7.3',
'wsgi.errors': <open file '/dev/null', mode 'w' at 0xb6713338>,
'wsgi.file_wrapper': <class wsgiref.util.FileWrapper at 0xb688e5e0>,
'wsgi.input': <socket._fileobject object at 0xb6735330>,
'wsgi.multiprocess': False,
'wsgi.multithread': True,
'wsgi.run_once': False,
'wsgi.url_scheme': 'http',
'wsgi.version': (1, 0)}
2014-01-01 16:04:34,490 - DEBUG: Sanitized path: /felix/
2014-01-01 16:04:34,493 - DEBUG: Answer status: 200 OK
2014-01-01 16:04:34,567 - INFO: PROPFIND request at /felix/ received
2014-01-01 16:04:34,631 - DEBUG: Request headers:
{'CONTENT_LENGTH': '88',
'CONTENT_TYPE': 'text/xml; charset="utf-8"',
'GATEWAY_INTERFACE': 'CGI/1.1',
'HTTP_ACCEPT_ENCODING': 'gzip',
'HTTP_CONNECTION': 'Keep-Alive',
'HTTP_DEPTH': '0',
'HTTP_HOST': '192.168.1.5:5232',
'HTTP_USER_AGENT': 'DAVdroid/0.5.4-alpha',
'PATH_INFO': '/felix/',
'QUERY_STRING': '',
'REMOTE_ADDR': '192.168.1.21',
'REMOTE_HOST': '',
'REQUEST_METHOD': 'PROPFIND',
'SCRIPT_NAME': '',
'SERVER_NAME': 'raspberrypi',
'SERVER_PORT': '5232',
'SERVER_PROTOCOL': 'HTTP/1.1',
'SERVER_SOFTWARE': 'WSGIServer/0.1 Python/2.7.3',
'wsgi.errors': <open file '/dev/null', mode 'w' at 0xb6713338>,
'wsgi.file_wrapper': <class wsgiref.util.FileWrapper at 0xb688e5e0>,
'wsgi.input': <socket._fileobject object at 0xb6735330>,
'wsgi.multiprocess': False,
'wsgi.multithread': True,
'wsgi.run_once': False,
'wsgi.url_scheme': 'http',
'wsgi.version': (1, 0)}
2014-01-01 16:04:34,633 - DEBUG: Sanitized path: /felix/
2014-01-01 16:04:34,635 - DEBUG: Request content:





2014-01-01 16:04:34,671 - DEBUG: Response content:

/felix/ HTTP/1.1 200 OK HTTP/1.1 404 Not Found

2014-01-01 16:04:34,673 - DEBUG: Answer status: 207 Unknown
...

But the directory felix/ definitely exists in filesystem_folder (and storage backend is filesystem). Also, Lightning works without problems with URL /felix/calendar.ics.

Example for MySQL data storage

I'm trying to setup radicale with mysql as database.
config file looks straightforward. Change storage type and provide database_url.
However it does not work as expected. Could some more detailed example be provided?
Looking at database logs I do see user connected and executing some selects. But no creation of tables.
Should I create some tables manually for Radicale?

Regards

UnboundLocalError: collection_props

when used with CardDavMATE, radicale shows this error message -- looks like a case of "if available, we'll assign" and later "oh, it seems to be available locally, i'll just use it":

Traceback (most recent call last):
  File "/usr/lib/python2.7/wsgiref/handlers.py", line 85, in run
    self.result = application(self.environ, self.start_response)
  File "/usr/lib/python2.7/dist-packages/radicale/__init__.py", line 300, in __call__
    user)
  File "/usr/lib/python2.7/dist-packages/radicale/__init__.py", line 509, in propfind
    environ["PATH_INFO"], content, collections, user)
  File "/usr/lib/python2.7/dist-packages/radicale/xmlutils.py", line 223, in propfind
    response = _propfind_response(path, collection, props, user)
  File "/usr/lib/python2.7/dist-packages/radicale/xmlutils.py", line 273, in _propfind_response
    if human_tag in collection_props:
UnboundLocalError: local variable 'collection_props' referenced before assignment

this can be fixed easily (but i don't know if that's the desired behavior):

diff --git a/radicale/xmlutils.py b/radicale/xmlutils.py
index 54c0ada..cf0b8e4 100644
--- a/radicale/xmlutils.py
+++ b/radicale/xmlutils.py
@@ -232,6 +232,8 @@ def _propfind_response(path, item, props, user):
     if is_collection:
         with item.props as properties:
             collection_props = properties
+    else:
+        collection_props = {}

     response = ET.Element(_tag("D", "response"))

it should be checked whether the pylint checks are still in place, because such a thing should usually trigger a pylint E0601.

CalDAV 'REPORT' sends back 'href' with double slash format!?

Working with REPORT I noticed the response with 'href' has double slashing like this:

 $[0] = [string] "<?xml version=\"1.0\"?>
 <multistatus xmlns=\"DAV:\">  
 <response>
 <href>//gTest//1357126959293-989169445</href>
 <propstat>

I would expect NO double slash here!
Compared to other implementations following the RFC that looks like this:

 $[1] = [string] "<?xml version=\"1.0\" encoding=\"utf-8\"?>
<d:multistatus xmlns:d=\"DAV:\" xmlns:s=\"http://sabredav.org/ns\" xmlns:fx=\"http://fruux.com/ns\" xmlns:cal=\"urn:ietf:params:xml:ns:caldav\" xmlns:cs=\"http://calendarserver.org/ns/\" xmlns:card=\"urn:ietf:params:xml:ns:carddav\">
<d:response>
<d:href>/calendars/a1234567890/tasks/1389880320457-938835311.ics</d:href>

Also this I would define as a bug!?

Thoughts?

Günter

WSGI application doesn't work on Pyhon 3.2

This will turn up in the logs:

GET request at / received
Traceback (most recent call last):
  File "/usr/lib64/python3.2/site-packages/radicale/__init__.py", line 267, in __call__
    "Response content:\n%s" % self.decode(answer, environ))
  File "/usr/lib64/python3.2/site-packages/radicale/__init__.py", line 158, in decode
    return text.decode(charset)
AttributeError: 'str' object has no attribute 'decode'

The current line that causes this seems to be here: https://github.com/Kozea/Radicale/blob/master/radicale/__init__.py#L313

The answer should not be a str, but a bytes object. This will be returned by read() on the wsgi.input stream, and so on. See PEP-3333 for reference.

I made on of the worst and most disturbing monkeypatches in my career to get this working for now:

import radicale

original_decode = radicale.Application.decode
def python3_wsgi_decode(self, text, environ):
    if isinstance(text, str):
        text = text.encode("utf-8")
    return original_decode(self, text, environ)
radicale.Application.decode = python3_wsgi_decode

radicale.log.start()
application = radicale.Application()

The realm used for Basic authentication should be configurable

Rather than hard-coding the realm to use, the value should taken from the config file.

The change is quite obvious, and I've made a patch. If you'd like, I could send it wherever would be helpful. I expect it would get mangled if I insert it here.

ETags changing randomly

The ETags for items are randomly changing, making clients think that they are out of sync and causing problems with modifying and deleting items. See log below.

The client requests a REPORT (line 318) which returns an ETag for an event of -4049659368375310251 (line 367). Next, the client tries to PUT a modification to the item (line 434) with an HTTP_IF_MATCH value of -4049659368375310251 (line 426) matching the ETag. Radicale rejects the PUT with a 412 Precondition Failed error (line 506). The client then requests another REPORT (line 530) and is told the ETag is now 2187202860821113076 (line 579), despite the fact that no actions were performed by any client between the first REPORT and the PUT.

2013-10-25 03:34:38,110 - DEBUG: Authentication type is None
2013-10-25 03:34:38,110 - DEBUG: Rights type is None
2013-10-25 03:34:38,116 - INFO: PUT request at /q/cal/3bcc614b-38f6-40f2-978f-b4c437c76180.ics received
2013-10-25 03:34:38,119 - DEBUG: Request headers:
{'CONTENT_LENGTH': '739',
 'CONTENT_TYPE': 'text/calendar; charset=utf-8',
 'DOCUMENT_ROOT': '/srv/http',
 'GATEWAY_INTERFACE': 'CGI/1.1',
 'HTTP_ACCEPT': 'text/xml',
 'HTTP_ACCEPT_CHARSET': 'utf-8,*;q=0.1',
 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
 'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.5',
 'HTTP_CACHE_CONTROL': 'no-cache',
 'HTTP_CONNECTION': 'keep-alive',
 'HTTP_HOST': '122.293.432.756',
 'HTTP_IF_NONE_MATCH': '*',
 'HTTP_PRAGMA': 'no-cache',
 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.0 Lightning/2.6b3',
 'PATH_INFO': '/q/cal/3bcc614b-38f6-40f2-978f-b4c437c76180.ics',
 'PATH_TRANSLATED': '/srv/http/calendar/radicale.wsgi/q/cal/3bcc614b-38f6-40f2-978f-b4c437c76180.ics',
 'QUERY_STRING': '',
 'REMOTE_ADDR': '623.173.347.734',
 'REMOTE_PORT': '45011',
 'REQUEST_METHOD': 'PUT',
 'REQUEST_URI': '/q/cal/3bcc614b-38f6-40f2-978f-b4c437c76180.ics',
 'SCRIPT_FILENAME': '/srv/http/calendar/radicale.wsgi',
 'SCRIPT_NAME': '',
 'SERVER_ADDR': '122.293.432.756',
 'SERVER_ADMIN': '[email protected]',
 'SERVER_NAME': '122.293.432.756',
 'SERVER_PORT': '80',
 'SERVER_PROTOCOL': 'HTTP/1.1',
 'SERVER_SIGNATURE': '<address>Apache/2.2.25 (Unix) mod_ssl/2.2.25 OpenSSL/1.0.1e DAV/2 mod_wsgi/3.4 Python/3.3.2 Server at 122.293.432.756 Port 80</address>\n',
 'SERVER_SOFTWARE': 'Apache/2.2.25 (Unix) mod_ssl/2.2.25 OpenSSL/1.0.1e DAV/2 mod_wsgi/3.4 Python/3.3.2',
 'UNIQUE_ID': 'UmnmzcDt9ewAAD3SFJkAAAAB',
 'mod_wsgi.application_group': '',
 'mod_wsgi.callable_object': 'application',
 'mod_wsgi.enable_sendfile': '0',
 'mod_wsgi.handler_script': '',
 'mod_wsgi.input_chunked': '0',
 'mod_wsgi.listener_host': '',
 'mod_wsgi.listener_port': '80',
 'mod_wsgi.process_group': '',
 'mod_wsgi.queue_start': '1382672077952522',
 'mod_wsgi.request_handler': 'wsgi-script',
 'mod_wsgi.script_reloading': '1',
 'mod_wsgi.version': (3, 4),
 'wsgi.errors': <_io.TextIOWrapper encoding='utf-8'>,
 'wsgi.file_wrapper': <built-in method file_wrapper of mod_wsgi.Adapter object at 0x7f9dcec90288>,
 'wsgi.input': <mod_wsgi.Input object at 0x7f9dcec8c3b0>,
 'wsgi.multiprocess': True,
 'wsgi.multithread': False,
 'wsgi.run_once': False,
 'wsgi.url_scheme': 'http',
 'wsgi.version': (1, 0)}
2013-10-25 03:34:38,120 - DEBUG: Sanitized path: /q/cal/3bcc614b-38f6-40f2-978f-b4c437c76180.ics
2013-10-25 03:34:38,120 - DEBUG: Request content:
BEGIN:VCALENDAR
PRODID:-//Mozilla.org/NONSGML Mozilla Calendar V1.1//EN
VERSION:2.0
BEGIN:VTIMEZONE
TZID:America/New_York
X-LIC-LOCATION:America/New_York
BEGIN:DAYLIGHT
TZOFFSETFROM:-0500
TZOFFSETTO:-0400
TZNAME:EDT
DTSTART:19700308T020000
RRULE:FREQ=YEARLY;BYDAY=2SU;BYMONTH=3
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:-0400
TZOFFSETTO:-0500
TZNAME:EST
DTSTART:19701101T020000
RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=11
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
CREATED:20131025T073438Z
LAST-MODIFIED:20131025T073442Z
DTSTAMP:20131025T073442Z
UID:3bcc614b-38f6-40f2-978f-b4c437c76180
SUMMARY:Event1
DTSTART;TZID=America/New_York:20131007T040000
DTEND;TZID=America/New_York:20131007T050000
END:VEVENT
END:VCALENDAR

2013-10-25 03:34:38,120 - DEBUG: Anonymous has read access to collection q/cal/
2013-10-25 03:34:38,120 - DEBUG: Anonymous has write access to collection q/cal/
2013-10-25 03:34:38,123 - DEBUG: Answer status: 201 Created
2013-10-25 03:34:38,407 - INFO: REPORT request at /q/cal/ received
2013-10-25 03:34:38,411 - DEBUG: Request headers:
{'CONTENT_LENGTH': '248',
 'CONTENT_TYPE': 'text/xml; charset=utf-8',
 'DOCUMENT_ROOT': '/srv/http',
 'GATEWAY_INTERFACE': 'CGI/1.1',
 'HTTP_ACCEPT': 'text/xml',
 'HTTP_ACCEPT_CHARSET': 'utf-8,*;q=0.1',
 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
 'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.5',
 'HTTP_CACHE_CONTROL': 'no-cache',
 'HTTP_CONNECTION': 'keep-alive',
 'HTTP_DEPTH': '1',
 'HTTP_HOST': '122.293.432.756',
 'HTTP_PRAGMA': 'no-cache',
 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.0 Lightning/2.6b3',
 'PATH_INFO': '/q/cal/',
 'PATH_TRANSLATED': '/srv/http/calendar/radicale.wsgi/q/cal/',
 'QUERY_STRING': '',
 'REMOTE_ADDR': '623.173.347.734',
 'REMOTE_PORT': '45011',
 'REQUEST_METHOD': 'REPORT',
 'REQUEST_URI': '/q/cal/',
 'SCRIPT_FILENAME': '/srv/http/calendar/radicale.wsgi',
 'SCRIPT_NAME': '',
 'SERVER_ADDR': '122.293.432.756',
 'SERVER_ADMIN': '[email protected]',
 'SERVER_NAME': '122.293.432.756',
 'SERVER_PORT': '80',
 'SERVER_PROTOCOL': 'HTTP/1.1',
 'SERVER_SIGNATURE': '<address>Apache/2.2.25 (Unix) mod_ssl/2.2.25 OpenSSL/1.0.1e DAV/2 mod_wsgi/3.4 Python/3.3.2 Server at 122.293.432.756 Port 80</address>\n',
 'SERVER_SOFTWARE': 'Apache/2.2.25 (Unix) mod_ssl/2.2.25 OpenSSL/1.0.1e DAV/2 mod_wsgi/3.4 Python/3.3.2',
 'UNIQUE_ID': 'UmnmzsDt9ewAAD3SFJoAAAAB',
 'mod_wsgi.application_group': '',
 'mod_wsgi.callable_object': 'application',
 'mod_wsgi.enable_sendfile': '0',
 'mod_wsgi.handler_script': '',
 'mod_wsgi.input_chunked': '0',
 'mod_wsgi.listener_host': '',
 'mod_wsgi.listener_port': '80',
 'mod_wsgi.process_group': '',
 'mod_wsgi.queue_start': '1382672078407395',
 'mod_wsgi.request_handler': 'wsgi-script',
 'mod_wsgi.script_reloading': '1',
 'mod_wsgi.version': (3, 4),
 'wsgi.errors': <_io.TextIOWrapper encoding='utf-8'>,
 'wsgi.file_wrapper': <built-in method file_wrapper of mod_wsgi.Adapter object at 0x7f9dcec3abe8>,
 'wsgi.input': <mod_wsgi.Input object at 0x7f9dcec93d70>,
 'wsgi.multiprocess': True,
 'wsgi.multithread': False,
 'wsgi.run_once': False,
 'wsgi.url_scheme': 'http',
 'wsgi.version': (1, 0)}
2013-10-25 03:34:38,411 - DEBUG: Sanitized path: /q/cal/
2013-10-25 03:34:38,411 - DEBUG: Request content:
<?xml version="1.0" encoding="UTF-8"?>
<C:calendar-multiget xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav"><D:prop><D:getetag/><C:calendar-data/></D:prop><D:href>/q/cal/3bcc614b-38f6-40f2-978f-b4c437c76180.ics</D:href></C:calendar-multiget>
2013-10-25 03:34:38,412 - DEBUG: Anonymous has read access to collection q/cal/
2013-10-25 03:34:38,412 - DEBUG: Anonymous has write access to collection q/cal/
2013-10-25 03:34:38,412 - DEBUG: Anonymous has read access to item 3bcc614b-38f6-40f2-978f-b4c437c76180.ics
2013-10-25 03:34:38,412 - DEBUG: Anonymous has write access to item 3bcc614b-38f6-40f2-978f-b4c437c76180.ics
2013-10-25 03:34:38,414 - DEBUG: Response content:
<?xml version="1.0"?>
<multistatus xmlns="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
  <response>
    <href>/q/cal/3bcc614b-38f6-40f2-978f-b4c437c76180.ics</href>
    <propstat>
      <prop>
        <getetag>"-3793751641795467561"</getetag>
        <C:calendar-data>BEGIN:VCALENDAR
PRODID:-//Radicale//NONSGML Radicale Server//EN
VERSION:2.0
BEGIN:VTIMEZONE
TZID:America/New_York
X-LIC-LOCATION:America/New_York
BEGIN:DAYLIGHT
TZOFFSETFROM:-0500
TZOFFSETTO:-0400
TZNAME:EDT
DTSTART:19700308T020000
RRULE:FREQ=YEARLY;BYDAY=2SU;BYMONTH=3
X-RADICALE-NAME:America/New_York
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:-0400
TZOFFSETTO:-0500
TZNAME:EST
DTSTART:19701101T020000
RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=11
X-RADICALE-NAME:America/New_York
END:STANDARD
X-RADICALE-NAME:America/New_York
END:VTIMEZONE
BEGIN:VEVENT
CREATED:20131025T073438Z
LAST-MODIFIED:20131025T073442Z
DTSTAMP:20131025T073442Z
UID:3bcc614b-38f6-40f2-978f-b4c437c76180
SUMMARY:Event1
DTSTART;TZID=America/New_York:20131007T040000
DTEND;TZID=America/New_York:20131007T050000
X-RADICALE-NAME:3bcc614b-38f6-40f2-978f-b4c437c76180.ics
END:VEVENT
END:VCALENDAR
</C:calendar-data>
      </prop>
      <status>HTTP/1.1 200 OK</status>
    </propstat>
  </response>
</multistatus>

2013-10-25 03:34:38,414 - DEBUG: Answer status: 207 Unknown
2013-10-25 03:34:44,291 - DEBUG: Authentication type is None
2013-10-25 03:34:44,291 - DEBUG: Rights type is None
2013-10-25 03:34:44,297 - INFO: PUT request at /q/cal/280fc62c-14c7-421f-b3e0-209908a2da72.ics received
2013-10-25 03:34:44,301 - DEBUG: Request headers:
{'CONTENT_LENGTH': '739',
 'CONTENT_TYPE': 'text/calendar; charset=utf-8',
 'DOCUMENT_ROOT': '/srv/http',
 'GATEWAY_INTERFACE': 'CGI/1.1',
 'HTTP_ACCEPT': 'text/xml',
 'HTTP_ACCEPT_CHARSET': 'utf-8,*;q=0.1',
 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
 'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.5',
 'HTTP_CACHE_CONTROL': 'no-cache',
 'HTTP_CONNECTION': 'keep-alive',
 'HTTP_HOST': '122.293.432.756',
 'HTTP_IF_NONE_MATCH': '*',
 'HTTP_PRAGMA': 'no-cache',
 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.0 Lightning/2.6b3',
 'PATH_INFO': '/q/cal/280fc62c-14c7-421f-b3e0-209908a2da72.ics',
 'PATH_TRANSLATED': '/srv/http/calendar/radicale.wsgi/q/cal/280fc62c-14c7-421f-b3e0-209908a2da72.ics',
 'QUERY_STRING': '',
 'REMOTE_ADDR': '623.173.347.734',
 'REMOTE_PORT': '45012',
 'REQUEST_METHOD': 'PUT',
 'REQUEST_URI': '/q/cal/280fc62c-14c7-421f-b3e0-209908a2da72.ics',
 'SCRIPT_FILENAME': '/srv/http/calendar/radicale.wsgi',
 'SCRIPT_NAME': '',
 'SERVER_ADDR': '122.293.432.756',
 'SERVER_ADMIN': '[email protected]',
 'SERVER_NAME': '122.293.432.756',
 'SERVER_PORT': '80',
 'SERVER_PROTOCOL': 'HTTP/1.1',
 'SERVER_SIGNATURE': '<address>Apache/2.2.25 (Unix) mod_ssl/2.2.25 OpenSSL/1.0.1e DAV/2 mod_wsgi/3.4 Python/3.3.2 Server at 122.293.432.756 Port 80</address>\n',
 'SERVER_SOFTWARE': 'Apache/2.2.25 (Unix) mod_ssl/2.2.25 OpenSSL/1.0.1e DAV/2 mod_wsgi/3.4 Python/3.3.2',
 'UNIQUE_ID': 'Umnm1MDt9ewAAD3TEwIAAAAC',
 'mod_wsgi.application_group': '',
 'mod_wsgi.callable_object': 'application',
 'mod_wsgi.enable_sendfile': '0',
 'mod_wsgi.handler_script': '',
 'mod_wsgi.input_chunked': '0',
 'mod_wsgi.listener_host': '',
 'mod_wsgi.listener_port': '80',
 'mod_wsgi.process_group': '',
 'mod_wsgi.queue_start': '1382672084131318',
 'mod_wsgi.request_handler': 'wsgi-script',
 'mod_wsgi.script_reloading': '1',
 'mod_wsgi.version': (3, 4),
 'wsgi.errors': <_io.TextIOWrapper encoding='utf-8'>,
 'wsgi.file_wrapper': <built-in method file_wrapper of mod_wsgi.Adapter object at 0x7f9dcec90288>,
 'wsgi.input': <mod_wsgi.Input object at 0x7f9dcec8c3b0>,
 'wsgi.multiprocess': True,
 'wsgi.multithread': False,
 'wsgi.run_once': False,
 'wsgi.url_scheme': 'http',
 'wsgi.version': (1, 0)}
2013-10-25 03:34:44,301 - DEBUG: Sanitized path: /q/cal/280fc62c-14c7-421f-b3e0-209908a2da72.ics
2013-10-25 03:34:44,301 - DEBUG: Request content:
BEGIN:VCALENDAR
PRODID:-//Mozilla.org/NONSGML Mozilla Calendar V1.1//EN
VERSION:2.0
BEGIN:VTIMEZONE
TZID:America/New_York
X-LIC-LOCATION:America/New_York
BEGIN:DAYLIGHT
TZOFFSETFROM:-0500
TZOFFSETTO:-0400
TZNAME:EDT
DTSTART:19700308T020000
RRULE:FREQ=YEARLY;BYDAY=2SU;BYMONTH=3
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:-0400
TZOFFSETTO:-0500
TZNAME:EST
DTSTART:19701101T020000
RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=11
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
CREATED:20131025T073444Z
LAST-MODIFIED:20131025T073448Z
DTSTAMP:20131025T073448Z
UID:280fc62c-14c7-421f-b3e0-209908a2da72
SUMMARY:Event2
DTSTART;TZID=America/New_York:20131008T040000
DTEND;TZID=America/New_York:20131008T050000
END:VEVENT
END:VCALENDAR

2013-10-25 03:34:44,301 - DEBUG: Anonymous has read access to collection q/cal/
2013-10-25 03:34:44,301 - DEBUG: Anonymous has write access to collection q/cal/
2013-10-25 03:34:44,304 - DEBUG: Answer status: 201 Created
2013-10-25 03:34:44,559 - INFO: REPORT request at /q/cal/ received
2013-10-25 03:34:44,562 - DEBUG: Request headers:
{'CONTENT_LENGTH': '248',
 'CONTENT_TYPE': 'text/xml; charset=utf-8',
 'DOCUMENT_ROOT': '/srv/http',
 'GATEWAY_INTERFACE': 'CGI/1.1',
 'HTTP_ACCEPT': 'text/xml',
 'HTTP_ACCEPT_CHARSET': 'utf-8,*;q=0.1',
 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
 'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.5',
 'HTTP_CACHE_CONTROL': 'no-cache',
 'HTTP_CONNECTION': 'keep-alive',
 'HTTP_DEPTH': '1',
 'HTTP_HOST': '122.293.432.756',
 'HTTP_PRAGMA': 'no-cache',
 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.0 Lightning/2.6b3',
 'PATH_INFO': '/q/cal/',
 'PATH_TRANSLATED': '/srv/http/calendar/radicale.wsgi/q/cal/',
 'QUERY_STRING': '',
 'REMOTE_ADDR': '623.173.347.734',
 'REMOTE_PORT': '45012',
 'REQUEST_METHOD': 'REPORT',
 'REQUEST_URI': '/q/cal/',
 'SCRIPT_FILENAME': '/srv/http/calendar/radicale.wsgi',
 'SCRIPT_NAME': '',
 'SERVER_ADDR': '122.293.432.756',
 'SERVER_ADMIN': '[email protected]',
 'SERVER_NAME': '122.293.432.756',
 'SERVER_PORT': '80',
 'SERVER_PROTOCOL': 'HTTP/1.1',
 'SERVER_SIGNATURE': '<address>Apache/2.2.25 (Unix) mod_ssl/2.2.25 OpenSSL/1.0.1e DAV/2 mod_wsgi/3.4 Python/3.3.2 Server at 122.293.432.756 Port 80</address>\n',
 'SERVER_SOFTWARE': 'Apache/2.2.25 (Unix) mod_ssl/2.2.25 OpenSSL/1.0.1e DAV/2 mod_wsgi/3.4 Python/3.3.2',
 'UNIQUE_ID': 'Umnm1MDt9ewAAD3TEwMAAAAC',
 'mod_wsgi.application_group': '',
 'mod_wsgi.callable_object': 'application',
 'mod_wsgi.enable_sendfile': '0',
 'mod_wsgi.handler_script': '',
 'mod_wsgi.input_chunked': '0',
 'mod_wsgi.listener_host': '',
 'mod_wsgi.listener_port': '80',
 'mod_wsgi.process_group': '',
 'mod_wsgi.queue_start': '1382672084558892',
 'mod_wsgi.request_handler': 'wsgi-script',
 'mod_wsgi.script_reloading': '1',
 'mod_wsgi.version': (3, 4),
 'wsgi.errors': <_io.TextIOWrapper encoding='utf-8'>,
 'wsgi.file_wrapper': <built-in method file_wrapper of mod_wsgi.Adapter object at 0x7f9dcec3acd8>,
 'wsgi.input': <mod_wsgi.Input object at 0x7f9dcec8c5b0>,
 'wsgi.multiprocess': True,
 'wsgi.multithread': False,
 'wsgi.run_once': False,
 'wsgi.url_scheme': 'http',
 'wsgi.version': (1, 0)}
2013-10-25 03:34:44,563 - DEBUG: Sanitized path: /q/cal/
2013-10-25 03:34:44,563 - DEBUG: Request content:
<?xml version="1.0" encoding="UTF-8"?>
<C:calendar-multiget xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav"><D:prop><D:getetag/><C:calendar-data/></D:prop><D:href>/q/cal/280fc62c-14c7-421f-b3e0-209908a2da72.ics</D:href></C:calendar-multiget>
2013-10-25 03:34:44,563 - DEBUG: Anonymous has read access to collection q/cal/
2013-10-25 03:34:44,563 - DEBUG: Anonymous has write access to collection q/cal/
2013-10-25 03:34:44,564 - DEBUG: Anonymous has read access to item 280fc62c-14c7-421f-b3e0-209908a2da72.ics
2013-10-25 03:34:44,564 - DEBUG: Anonymous has write access to item 280fc62c-14c7-421f-b3e0-209908a2da72.ics
2013-10-25 03:34:44,564 - DEBUG: Anonymous has read access to item 3bcc614b-38f6-40f2-978f-b4c437c76180.ics
2013-10-25 03:34:44,564 - DEBUG: Anonymous has write access to item 3bcc614b-38f6-40f2-978f-b4c437c76180.ics
2013-10-25 03:34:44,566 - DEBUG: Response content:
<?xml version="1.0"?>
<multistatus xmlns="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
  <response>
    <href>/q/cal/280fc62c-14c7-421f-b3e0-209908a2da72.ics</href>
    <propstat>
      <prop>
        <getetag>"-4049659368375310251"</getetag>
        <C:calendar-data>BEGIN:VCALENDAR
PRODID:-//Radicale//NONSGML Radicale Server//EN
VERSION:2.0
BEGIN:VTIMEZONE
TZID:America/New_York
X-LIC-LOCATION:America/New_York
BEGIN:DAYLIGHT
TZOFFSETFROM:-0500
TZOFFSETTO:-0400
TZNAME:EDT
DTSTART:19700308T020000
RRULE:FREQ=YEARLY;BYDAY=2SU;BYMONTH=3
X-RADICALE-NAME:America/New_York
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:-0400
TZOFFSETTO:-0500
TZNAME:EST
DTSTART:19701101T020000
RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=11
X-RADICALE-NAME:America/New_York
END:STANDARD
X-RADICALE-NAME:America/New_York
END:VTIMEZONE
BEGIN:VEVENT
CREATED:20131025T073444Z
LAST-MODIFIED:20131025T073448Z
DTSTAMP:20131025T073448Z
UID:280fc62c-14c7-421f-b3e0-209908a2da72
SUMMARY:Event2
DTSTART;TZID=America/New_York:20131008T040000
DTEND;TZID=America/New_York:20131008T050000
X-RADICALE-NAME:280fc62c-14c7-421f-b3e0-209908a2da72.ics
END:VEVENT
END:VCALENDAR
</C:calendar-data>
      </prop>
      <status>HTTP/1.1 200 OK</status>
    </propstat>
  </response>
</multistatus>

2013-10-25 03:34:44,566 - DEBUG: Answer status: 207 Unknown
2013-10-25 03:34:51,878 - DEBUG: Authentication type is None
2013-10-25 03:34:51,879 - DEBUG: Rights type is None
2013-10-25 03:34:51,884 - INFO: PUT request at /q/cal/280fc62c-14c7-421f-b3e0-209908a2da72.ics received
2013-10-25 03:34:51,888 - DEBUG: Request headers:
{'CONTENT_LENGTH': '844',
 'CONTENT_TYPE': 'text/calendar; charset=utf-8',
 'DOCUMENT_ROOT': '/srv/http',
 'GATEWAY_INTERFACE': 'CGI/1.1',
 'HTTP_ACCEPT': 'text/xml',
 'HTTP_ACCEPT_CHARSET': 'utf-8,*;q=0.1',
 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
 'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.5',
 'HTTP_CACHE_CONTROL': 'no-cache',
 'HTTP_CONNECTION': 'keep-alive',
 'HTTP_HOST': '122.293.432.756',
 'HTTP_IF_MATCH': '"-4049659368375310251"',
 'HTTP_PRAGMA': 'no-cache',
 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.0 Lightning/2.6b3',
 'PATH_INFO': '/q/cal/280fc62c-14c7-421f-b3e0-209908a2da72.ics',
 'PATH_TRANSLATED': '/srv/http/calendar/radicale.wsgi/q/cal/280fc62c-14c7-421f-b3e0-209908a2da72.ics',
 'QUERY_STRING': '',
 'REMOTE_ADDR': '623.173.347.734',
 'REMOTE_PORT': '45013',
 'REQUEST_METHOD': 'PUT',
 'REQUEST_URI': '/q/cal/280fc62c-14c7-421f-b3e0-209908a2da72.ics',
 'SCRIPT_FILENAME': '/srv/http/calendar/radicale.wsgi',
 'SCRIPT_NAME': '',
 'SERVER_ADDR': '122.293.432.756',
 'SERVER_ADMIN': '[email protected]',
 'SERVER_NAME': '122.293.432.756',
 'SERVER_PORT': '80',
 'SERVER_PROTOCOL': 'HTTP/1.1',
 'SERVER_SIGNATURE': '<address>Apache/2.2.25 (Unix) mod_ssl/2.2.25 OpenSSL/1.0.1e DAV/2 mod_wsgi/3.4 Python/3.3.2 Server at 122.293.432.756 Port 80</address>\n',
 'SERVER_SOFTWARE': 'Apache/2.2.25 (Unix) mod_ssl/2.2.25 OpenSSL/1.0.1e DAV/2 mod_wsgi/3.4 Python/3.3.2',
 'UNIQUE_ID': 'Umnm28Dt9ewAAD3UGCgAAAAD',
 'mod_wsgi.application_group': '',
 'mod_wsgi.callable_object': 'application',
 'mod_wsgi.enable_sendfile': '0',
 'mod_wsgi.handler_script': '',
 'mod_wsgi.input_chunked': '0',
 'mod_wsgi.listener_host': '',
 'mod_wsgi.listener_port': '80',
 'mod_wsgi.process_group': '',
 'mod_wsgi.queue_start': '1382672091718221',
 'mod_wsgi.request_handler': 'wsgi-script',
 'mod_wsgi.script_reloading': '1',
 'mod_wsgi.version': (3, 4),
 'wsgi.errors': <_io.TextIOWrapper encoding='utf-8'>,
 'wsgi.file_wrapper': <built-in method file_wrapper of mod_wsgi.Adapter object at 0x7f9dcec90288>,
 'wsgi.input': <mod_wsgi.Input object at 0x7f9dcec8c3b0>,
 'wsgi.multiprocess': True,
 'wsgi.multithread': False,
 'wsgi.run_once': False,
 'wsgi.url_scheme': 'http',
 'wsgi.version': (1, 0)}
2013-10-25 03:34:51,888 - DEBUG: Sanitized path: /q/cal/280fc62c-14c7-421f-b3e0-209908a2da72.ics
2013-10-25 03:34:51,888 - DEBUG: Request content:
BEGIN:VCALENDAR
PRODID:-//Mozilla.org/NONSGML Mozilla Calendar V1.1//EN
VERSION:2.0
BEGIN:VTIMEZONE
TZID:America/New_York
X-LIC-LOCATION:America/New_York
BEGIN:DAYLIGHT
TZOFFSETFROM:-0500
TZOFFSETTO:-0400
TZNAME:EDT
DTSTART:19700308T020000
RRULE:FREQ=YEARLY;BYDAY=2SU;BYMONTH=3
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:-0400
TZOFFSETTO:-0500
TZNAME:EST
DTSTART:19701101T020000
RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=11
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
CREATED:20131025T073444Z
LAST-MODIFIED:20131025T073456Z
DTSTAMP:20131025T073456Z
UID:280fc62c-14c7-421f-b3e0-209908a2da72
SUMMARY:Event2
DTSTART;TZID=America/New_York:20131008T040000
DTEND;TZID=America/New_York:20131008T050000
X-RADICALE-NAME:280fc62c-14c7-421f-b3e0-209908a2da72.ics
LOCATION:here
SEQUENCE:1
X-MOZ-GENERATION:1
END:VEVENT
END:VCALENDAR

2013-10-25 03:34:51,889 - DEBUG: Anonymous has read access to collection q/cal/
2013-10-25 03:34:51,889 - DEBUG: Anonymous has write access to collection q/cal/
2013-10-25 03:34:51,890 - DEBUG: Answer status: 412 Precondition Failed
2013-10-25 03:34:59,975 - DEBUG: Authentication type is None
2013-10-25 03:34:59,975 - DEBUG: Rights type is None
2013-10-25 03:34:59,980 - INFO: REPORT request at /q/cal/ received
2013-10-25 03:34:59,984 - DEBUG: Request headers:
{'CONTENT_LENGTH': '248',
 'CONTENT_TYPE': 'text/xml; charset=utf-8',
 'DOCUMENT_ROOT': '/srv/http',
 'GATEWAY_INTERFACE': 'CGI/1.1',
 'HTTP_ACCEPT': 'text/xml',
 'HTTP_ACCEPT_CHARSET': 'utf-8,*;q=0.1',
 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
 'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.5',
 'HTTP_CACHE_CONTROL': 'no-cache',
 'HTTP_CONNECTION': 'keep-alive',
 'HTTP_DEPTH': '1',
 'HTTP_HOST': '122.293.432.756',
 'HTTP_PRAGMA': 'no-cache',
 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.0 Lightning/2.6b3',
 'PATH_INFO': '/q/cal/',
 'PATH_TRANSLATED': '/srv/http/calendar/radicale.wsgi/q/cal/',
 'QUERY_STRING': '',
 'REMOTE_ADDR': '623.173.347.734',
 'REMOTE_PORT': '45014',
 'REQUEST_METHOD': 'REPORT',
 'REQUEST_URI': '/q/cal/',
 'SCRIPT_FILENAME': '/srv/http/calendar/radicale.wsgi',
 'SCRIPT_NAME': '',
 'SERVER_ADDR': '122.293.432.756',
 'SERVER_ADMIN': '[email protected]',
 'SERVER_NAME': '122.293.432.756',
 'SERVER_PORT': '80',
 'SERVER_PROTOCOL': 'HTTP/1.1',
 'SERVER_SIGNATURE': '<address>Apache/2.2.25 (Unix) mod_ssl/2.2.25 OpenSSL/1.0.1e DAV/2 mod_wsgi/3.4 Python/3.3.2 Server at 122.293.432.756 Port 80</address>\n',
 'SERVER_SOFTWARE': 'Apache/2.2.25 (Unix) mod_ssl/2.2.25 OpenSSL/1.0.1e DAV/2 mod_wsgi/3.4 Python/3.3.2',
 'UNIQUE_ID': 'Umnm48Dt9ewAAD3VIE8AAAAE',
 'mod_wsgi.application_group': '',
 'mod_wsgi.callable_object': 'application',
 'mod_wsgi.enable_sendfile': '0',
 'mod_wsgi.handler_script': '',
 'mod_wsgi.input_chunked': '0',
 'mod_wsgi.listener_host': '',
 'mod_wsgi.listener_port': '80',
 'mod_wsgi.process_group': '',
 'mod_wsgi.queue_start': '1382672099818140',
 'mod_wsgi.request_handler': 'wsgi-script',
 'mod_wsgi.script_reloading': '1',
 'mod_wsgi.version': (3, 4),
 'wsgi.errors': <_io.TextIOWrapper encoding='utf-8'>,
 'wsgi.file_wrapper': <built-in method file_wrapper of mod_wsgi.Adapter object at 0x7f9dcec90288>,
 'wsgi.input': <mod_wsgi.Input object at 0x7f9dcec8c3b0>,
 'wsgi.multiprocess': True,
 'wsgi.multithread': False,
 'wsgi.run_once': False,
 'wsgi.url_scheme': 'http',
 'wsgi.version': (1, 0)}
2013-10-25 03:34:59,984 - DEBUG: Sanitized path: /q/cal/
2013-10-25 03:34:59,984 - DEBUG: Request content:
<?xml version="1.0" encoding="UTF-8"?>
<C:calendar-multiget xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav"><D:prop><D:getetag/><C:calendar-data/></D:prop><D:href>/q/cal/280fc62c-14c7-421f-b3e0-209908a2da72.ics</D:href></C:calendar-multiget>
2013-10-25 03:34:59,985 - DEBUG: Anonymous has read access to collection q/cal/
2013-10-25 03:34:59,985 - DEBUG: Anonymous has write access to collection q/cal/
2013-10-25 03:34:59,985 - DEBUG: Anonymous has read access to item 3bcc614b-38f6-40f2-978f-b4c437c76180.ics
2013-10-25 03:34:59,985 - DEBUG: Anonymous has write access to item 3bcc614b-38f6-40f2-978f-b4c437c76180.ics
2013-10-25 03:34:59,985 - DEBUG: Anonymous has read access to item 280fc62c-14c7-421f-b3e0-209908a2da72.ics
2013-10-25 03:34:59,985 - DEBUG: Anonymous has write access to item 280fc62c-14c7-421f-b3e0-209908a2da72.ics
2013-10-25 03:34:59,988 - DEBUG: Response content:
<?xml version="1.0"?>
<multistatus xmlns="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
  <response>
    <href>/q/cal/280fc62c-14c7-421f-b3e0-209908a2da72.ics</href>
    <propstat>
      <prop>
        <getetag>"2187202860821113076"</getetag>
        <C:calendar-data>BEGIN:VCALENDAR
PRODID:-//Radicale//NONSGML Radicale Server//EN
VERSION:2.0
BEGIN:VTIMEZONE
TZID:America/New_York
X-LIC-LOCATION:America/New_York
BEGIN:DAYLIGHT
TZOFFSETFROM:-0500
TZOFFSETTO:-0400
TZNAME:EDT
DTSTART:19700308T020000
RRULE:FREQ=YEARLY;BYDAY=2SU;BYMONTH=3
X-RADICALE-NAME:America/New_York
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:-0400
TZOFFSETTO:-0500
TZNAME:EST
DTSTART:19701101T020000
RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=11
X-RADICALE-NAME:America/New_York
END:STANDARD
X-RADICALE-NAME:America/New_York
END:VTIMEZONE
BEGIN:VEVENT
CREATED:20131025T073444Z
LAST-MODIFIED:20131025T073448Z
DTSTAMP:20131025T073448Z
UID:280fc62c-14c7-421f-b3e0-209908a2da72
SUMMARY:Event2
DTSTART;TZID=America/New_York:20131008T040000
DTEND;TZID=America/New_York:20131008T050000
X-RADICALE-NAME:280fc62c-14c7-421f-b3e0-209908a2da72.ics
END:VEVENT
END:VCALENDAR
</C:calendar-data>
      </prop>
      <status>HTTP/1.1 200 OK</status>
    </propstat>
  </response>
</multistatus>

2013-10-25 03:34:59,988 - DEBUG: Answer status: 207 Unknown

I hacked the code a little to send the ETag hash values directly to the logger and they matched their values in the XML markup. I also had it directly write the item text to the log, and as far as I could tell it was identical, though there may have been differences in non-printing characters that I didn't see.

I couldn't find a consistent method of reproducing the problem, but I think it only occurred when there was more than one item in the collection. It seemed to be correlated to situations when I think Radicale rearranged the order of items in the collection.

Initial setup will not sync with Lightning

Not sure what's wrong here, but this is what I'm getting in the logs -- the package appears to load correctly but Lightning never returns from a sync (says "Checking calendars...") and nothing is created in the radicale directory structure.

I am running with all defaults at present for testing purposes....

[root@NewFS /usr/local/etc/radicale]# radicale --debug
Logging configuration file '/etc/radicale/logging' not found, using stdout.
Starting Radicale
Authentication type is None
Rights type is None
Base URL prefix: /
Listening to FS.Denninger.net port 5232
Radicale server ready
PROPFIND request at /karl/calendar/ received
Request headers:
{'CONTENT_LENGTH': '150',
'CONTENT_TYPE': 'text/xml; charset=utf-8',
'GATEWAY_INTERFACE': 'CGI/1.1',
'HTTP_ACCEPT': 'text/xml',
'HTTP_ACCEPT_CHARSET': 'utf-8,*;q=0.1',
'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.5',
'HTTP_CACHE_CONTROL': 'no-cache',
'HTTP_CONNECTION': 'keep-alive',
'HTTP_DEPTH': '0',
'HTTP_HOST': 'newfs.denninger.net:5232',
'HTTP_PRAGMA': 'no-cache',
'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130215 Thunderbird/17.0.3 Lightning/1.9.1',
'PATH_INFO': '/karl/calendar/',
'QUERY_STRING': '',
'REMOTE_ADDR': '192.168.1.40',
'REMOTE_HOST': 'Karl-Desktop.Denninger.net',
'REQUEST_METHOD': 'PROPFIND',
'SCRIPT_NAME': '',
'SERVER_NAME': 'FS.Denninger.net',
'SERVER_PORT': '5232',
'SERVER_PROTOCOL': 'HTTP/1.1',
'SERVER_SOFTWARE': 'WSGIServer/0.1 Python/2.7.3',
'wsgi.errors': <open file '', mode 'w' at 0x80143e270>,
'wsgi.file_wrapper': <class wsgiref.util.FileWrapper at 0x8019619a8>,
'wsgi.input': <socket._fileobject object at 0x80504ced0>,
'wsgi.multiprocess': False,
'wsgi.multithread': True,
'wsgi.run_once': False,
'wsgi.url_scheme': 'http',
'wsgi.version': (1, 0)}
Sanitized path: /karl/calendar/
Request content:

<D:propfind xmlns:D="DAV:" xmlns:CS="http://calendarserver.org/ns/"><D:prop>CS:getctag//D:prop/D:propfind
Anonymous has read access to collection karl/calendar/
Anonymous has write access to collection karl/calendar/
Response content:

/karl/calendar/ CS:getctag"4776534034524480010"/CS:getctag HTTP/1.1 200 OK

Answer status: 207 Unknown

And that's it..... Server is FreeBSD 9, Radicale from the ports package (0.8)

Support filters

We should implement the filters support in CalDAV, and see if it helps some clients (seems to be very useful for Apple's clients).

If this is finally useless for supported clients, just close that bug.

Authentication broken in some cases on Radicale 0.7

Hi all,
I am using radicale 0.7 from the Debian 7 repositories. I use it as daemon.
I have configured htpasswd authentication and tested it with Thunderbird 24.0 and found the following issue:
I have configured myuser:mypassword in the htpasswd file (say plaintext for the sake of simplicity)
If I want to create a calendar from Thunderbird on http://localhost:5232/myuser/calendar.ics (as per documentation) radicale refuses to authenticate. This is because it sets the calendar owner to "nobody"/None and it will never pass authentication against "myuser", it does not even go as far as checking the password.
If I turn off authentication, http://localhost:5232/myuser/calendar.ics is created OK.
On the other hand if I use an URL of the type http://localhost/myuser/calendars/calendar.ics the authentication works OK.
I am sorry I have not been able to test this on a more recent version of Radicale.
Thank you.

Strange behaviour with CardDAV in Contacts for iOS 6

The Contacts app for iOS 6 supports CardDAV but Radicale does not completely support it yet.

I added a new CardDAV account in the iOS Settings app, no problems here. Adding a new contact in the Contacts app works. Checked the server and indeed, the card is added to the collections folder. Opening the Groups view in the Contacts app on the phone shows the Radicale server group, all fine.

Now, when you close the app and come back a little later or restart the iPhone the contact has disappeared. Opening the Groups view no longer shows the Radicale server. The Radicale CardDAV setup is still visible in the Settings app though and activity in the Radicale sever log seems to indicate both are still talking.

Toggling the configuration on and off in the Settings app does not seem to fix the problem.

I am using the latest version (commit 4ad1fb4) from a blank slate: removed the ~/.config/radicale data and a vanilla configuration. Full log file at http://pastebin.com/PHMg2n8a.

I notice a lot of 404 Not Found and Answer status: 207 Unknown lines in the log, is that normal?

Crash

I had a working set up for Radicale version 0.8 (installed from yum on Fedora19). I then replaced Radicale with the current version in Github. Now I am seeing this error when I try to create new event:

mod_wsgi (pid=10220): Exception occurred processing WSGI script '/usr/share/radicale/radicale.wsgi'.
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/radicale/init.py", line 289, in call
user)
File "/usr/lib/python2.7/site-packages/radicale/init.py", line 549, in put
headers["ETag"] = new_item.etag
File "/usr/lib/python2.7/site-packages/radicale/ical.py", line 127, in etag
return '"%s"' % hash(self)
TypeError: an integer is required

There seems to be no mention of trouble in the radicale log file:

2013-10-30 11:31:57,213 - DEBUG: Authentication type is None
2013-10-30 11:31:57,217 - INFO: PUT request at /ken/foo.ics/ec62cf84-f4b2-4b19-9ec3-0dd739aae42d.ics received
2013-10-30 11:31:57,218 - DEBUG: Request headers:
{'AUTH_TYPE': 'Basic',
'CONTENT_LENGTH': '750',
'CONTENT_TYPE': 'text/calendar; charset=utf-8',
'CONTEXT_DOCUMENT_ROOT': '/var/www/html',
'CONTEXT_PREFIX': '',
'DOCUMENT_ROOT': '/var/www/html',
'GATEWAY_INTERFACE': 'CGI/1.1',
'HTTP_ACCEPT': 'text/xml',
'HTTP_ACCEPT_CHARSET': 'utf-8,;q=0.1',
'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.5',
'HTTP_CACHE_CONTROL': 'no-cache',
'HTTP_CONNECTION': 'keep-alive',
'HTTP_HOST': 'cal.shalmirane',
'HTTP_IF_NONE_MATCH': '
',
'HTTP_PRAGMA': 'no-cache',
'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130509 Thunderbird/17.0.6 Lightning/1.9.1',
'PATH_INFO': '/ken/foo.ics/ec62cf84-f4b2-4b19-9ec3-0dd739aae42d.ics',
'PATH_TRANSLATED': '/usr/share/radicale/radicale.wsgi/ken/foo.ics/ec62cf84-f4b2-4b19-9ec3-0dd739aae42d.ics',
'QUERY_STRING': '',
'REMOTE_ADDR': '192.168.0.150',
'REMOTE_PORT': '36559',
'REMOTE_USER': 'ken',
'REQUEST_METHOD': 'PUT',
'REQUEST_SCHEME': 'http',
'REQUEST_URI': '/ken/foo.ics/ec62cf84-f4b2-4b19-9ec3-0dd739aae42d.ics',
'SCRIPT_FILENAME': '/usr/share/radicale/radicale.wsgi',
'SCRIPT_NAME': '',
'SERVER_ADDR': '192.168.0.32',
'SERVER_ADMIN': 'root@localhost',
'SERVER_NAME': 'cal.shalmirane',
'SERVER_PORT': '80',
'SERVER_PROTOCOL': 'HTTP/1.1',
'SERVER_SIGNATURE': '',
'SERVER_SOFTWARE': 'Apache/2.4.6 (Fedora) OpenSSL/1.0.0-fips mod_wsgi/3.4 Python/2.7.5',
'UNIQUE_ID': 'UnFQnQRkUwGvyTP5MdAOCgAAAAA',
'mod_wsgi.application_group': '',
'mod_wsgi.callable_object': 'application',
'mod_wsgi.enable_sendfile': '0',
'mod_wsgi.handler_script': '',
'mod_wsgi.input_chunked': '0',
'mod_wsgi.listener_host': '',
'mod_wsgi.listener_port': '80',
'mod_wsgi.process_group': 'radicale',
'mod_wsgi.queue_start': '1383157917153380',
'mod_wsgi.request_handler': 'wsgi-script',
'mod_wsgi.script_reloading': '1',
'mod_wsgi.version': (3, 4),
'wsgi.errors': <mod_wsgi.Log object at 0x7f1f54234e70>,
'wsgi.file_wrapper': <built-in method file_wrapper of mod_wsgi.Adapter object at 0x7f1f5423be40>,
'wsgi.input': <mod_wsgi.Input object at 0x7f1f5422adb0>,
'wsgi.multiprocess': False,
'wsgi.multithread': False,
'wsgi.run_once': False,
'wsgi.url_scheme': 'http',
'wsgi.version': (1, 0)}
2013-10-30 11:31:57,218 - DEBUG: Sanitized path: /ken/foo.ics/ec62cf84-f4b2-4b19-9ec3-0dd739aae42d.ics
2013-10-30 11:31:57,219 - DEBUG: Request content:
BEGIN:VCALENDAR^M
PRODID:-//Mozilla.org/NONSGML Mozilla Calendar V1.1//EN^M
VERSION:2.0^M
BEGIN:VTIMEZONE^M
TZID:America/Los_Angeles^M
X-LIC-LOCATION:America/Los_Angeles^M
BEGIN:DAYLIGHT^M
TZOFFSETFROM:-0800^M
TZOFFSETTO:-0700^M
TZNAME:PDT^M
DTSTART:19700308T020000^M
RRULE:FREQ=YEARLY;BYDAY=2SU;BYMONTH=3^M
END:DAYLIGHT^M
BEGIN:STANDARD^M
TZOFFSETFROM:-0700^M
TZOFFSETTO:-0800^M
TZNAME:PST^M
DTSTART:19701101T020000^M
RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=11^M
END:STANDARD^M
END:VTIMEZONE^M
BEGIN:VEVENT^M
CREATED:20131030T183152Z^M
LAST-MODIFIED:20131030T183157Z^M
DTSTAMP:20131030T183157Z^M
UID:ec62cf84-f4b2-4b19-9ec3-0dd739aae42d^M
SUMMARY:XXXXX^M
DTSTART;TZID=America/Los_Angeles:20131101T120000^M
DTEND;TZID=America/Los_Angeles:20131101T130000^M
END:VEVENT^M
END:VCALENDAR^M

2013-10-30 11:31:57,219 - DEBUG: Anonymous has read access to collection ken/foo.ics/
2013-10-30 11:31:57,219 - DEBUG: Anonymous has write access to collection ken/foo.ics/

I can't imagine what might be causing this. My setup is quite vanilla (served by Apache with basic authorization) and this error seems unrelated to the interface to the OS and deep within the ical code itself.

-Ken

database storage backend seems broken

I've tried setting up radicale 0.8 and the git version at the time of this writing.

What worked:

  1. Set up radicale with the (default) filesystem storage backend
  2. Point a browser to myserver:5232/foo/contacts.vcf/
  3. Ignore the reply, notice that the collection was created
    4.Open CardDavMate and log in (no authentication configured) as 'foo'

In this case I get a resource 'contacts.vcf'. I can store/retrieve data just fine.

What didn't work:

  1. Set up radicale exactly the same (from a script: No user error possible)
    1.1 Set storage backend to database, the database_url to postgresql://radicale@/radicale
    1.2 Make sure that the schema.sql is sourced, tables exist and that the postgresql role has privileges
  2. Point a browser to myserver:5232/foo/contacts.vcf/
  3. Ignore the reply, notice that the collection was created in the database

radicale=# select * from collection; select * from header; select * from item; select * from line; select * from property;
path | parent_path
------------------+-------------
foo/contacts.vcf |
(1 row)

key | value | collection_path
---------+------------------------------------------+------------------
PRODID | -//Radicale//NONSGML Radicale Server//EN | foo/contacts.vcf
VERSION | 3.0 | foo/contacts.vcf
(2 rows)

name | tag | collection_path
------+-----+-----------------
(0 rows)

key | value | item_name | timestamp
-----+-------+-----------+-----------
(0 rows)

key | value | collection_path
-----+--------------+------------------
tag | VADDRESSBOOK | foo/contacts.vcf
(1 row)

4.Open (the very same, unmodified instance of) CardDavMate and log in (no authentication configured) as 'foo'

No resource shows up, the 'contacts.vcf' collection/resource isn't listed. No data can be retrieved or restored.

Thunderbird unable to modify contacts

Radicale version 0.8

Thunderbird sends carddav updates as a PUT request, with the following (relevant) headers;

'PATH_INFO': '/user/AddressBook.vcf/C5F2A891-F460-0001-E220-65E4D76D139E.vcf',
'REQUEST_METHOD': 'PUT',
'HTTP_IF_NONE_MATCH': '*',

This causes the put request to fail with a "Error: 412 Precondition Failed"

The issue is this section of code in radicale/init.py

   # Evolution bug workaround
    etag = environ.get("HTTP_IF_MATCH", "").replace("\\", "")
    match = environ.get("HTTP_IF_NONE_MATCH", "") == "*"
    if (not item and not etag) or (
            item and ((etag or item.etag) == item.etag) and not match):
        # PUT allowed in 3 cases
        # Case 1: No item and no ETag precondition: Add new item
        # Case 2: Item and ETag precondition verified: Modify item
        # Case 3: Item and no Etag precondition: Force modifying item

In this case, the comments do not appear to match the if statement. (item is true in our case)

I don't know enough about Webdav to know what the proper fix would be.

Jonathan

CalDAV 'REPORT' with VTODO also sends back VEVENT blocks (and viceversa)

This REPORT should only give VTODO of the
calendar, but also sends VEVENT blocks.

CalDAV:
  method: REPORT  headers:Depth:1;User-Agent:Reminderfox/2.1.4
  urlstr:http://localhost:5232//gTest/  login : admin
  contentType:application/xml
  content:
<c:calendar-query xmlns:d="DAV:" xmlns:c="urn:ietf:params:xml:ns:caldav">
  <d:prop>
    <d:getetag />
  </d:prop>
  <c:filter>
    <c:comp-filter name="VCALENDAR">
      <c:comp-filter name="VTODO" />
      </c:comp-filter>
  </c:filter>
</c:calendar-query>

AFAIK this shouldn't be the case .. if so --> BUG!

Günter

some error with python2

could use following patch to work around not sure about python3 compat

From 059cc1927e4a24df78f556cbcf64a3ac96491b7d Mon Sep 17 00:00:00 2001
Date: Mon, 19 Aug 2013 17:49:16 +0200
Subject: [PATCH] python2 fix

---
 radicale/rights.py |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/radicale/rights.py b/radicale/rights.py
index c848751..8241c40 100644
--- a/radicale/rights.py
+++ b/radicale/rights.py
@@ -24,6 +24,7 @@ Rights management.
 """

 import re
+import io
 import os.path

 from . import config, log
@@ -50,7 +51,7 @@ def _read_from_sections(user, collection, permission):
     regex = ConfigParser({"login": user, "path": collection})
     if TYPE in DEFINED_RIGHTS:
         log.LOGGER.debug("Rights type '%s'" % TYPE)
-        regex.read_string(DEFINED_RIGHTS[TYPE])
+        regex.readfp(io.BytesIO(DEFINED_RIGHTS[TYPE]))
     elif TYPE == "from_file":
         log.LOGGER.debug("Reading rights from file %s" % FILENAME)
         if not regex.read(FILENAME):
-- 
1.7.10.4

CalDAV Sync can't upload events to Radicale 0.8

I use Android CalDAV Sync to sync calendar of Google Calendar and aCalendar to Radicale 0.8 release. It can retrieve existing events from Radicale but can't upload new created events to it.

By the way, the IPHONE Calendar and Lightning works.

Here is some log has 404 that I think may be helpful:

<?xml version="1.0"?>
<multistatus xmlns="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav" xmlns:CS="http://calendarserver.org/ns/">
  <response>
    <href>/yuq/lightning.ics/c6d5f865-1279-49f6-8e36-958d2d7ac6dd.ics</href>
    <propstat>
      <prop>
        <resourcetype />
      </prop>
      <status>HTTP/1.1 200 OK</status>
    </propstat>
    <propstat>
      <prop>
        <displayname />
        <CS:getctag />
      </prop>
      <status>HTTP/1.1 404 Not Found</status>
    </propstat>
  </response>

who changes LAST-MODIFIED property

Apple iCal on Mavericks does not change LAST-MODIFIED when editing a VEVENT.
Gnome Evolution does change LAST-MODIFIED when editing a VEVENT.
It looks like Evolution does not see edits unless LAST-MODIFIED changes, and it looks like Apple believes that it is the server responsibility to produce self-consistent values of LAST-MODIFIED. RFC 5545 seems not to specify who is responsible for the value in LAST-MODIFIED. Should radicale ignore any value from the client and always update LAST-MODIFIED using its own notion of the time?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.