Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KOrganizer/Kontact cannot delete from Radicale CalDav (412 Precondition Failed) #117

Closed
szotsaki opened this issue Feb 23, 2014 · 7 comments

Comments

@szotsaki
Copy link

When I try to delete a calendar event from Kontact, I get an error message every time.

Here are the debug messages from Kontact:

DELETE request at /szotsaki/calendar/SDA1daf23c6-0000-0000-0000-000000000000.ics/ received
Request headers:
{'CONTENT_LENGTH': '',
 'CONTENT_TYPE': 'text/plain',
 'GATEWAY_INTERFACE': 'CGI/1.1',
 'HTTP_ACCEPT': 'text/html, text/*;q=0.9, image/jpeg;q=0.9, image/png;q=0.9, image/*;q=0.9, */*;q=0.8',
 'HTTP_ACCEPT_CHARSET': 'utf-8,*;q=0.5',
 'HTTP_ACCEPT_ENCODING': 'gzip, deflate, x-gzip, x-deflate',
 'HTTP_ACCEPT_LANGUAGE': 'hu,en-US;q=0.9,en;q=0.8',
 'HTTP_AUTHORIZATION': 'Basic xxxxxxxxx==',
 'HTTP_CACHE_CONTROL': 'no-cache',
 'HTTP_CONNECTION': 'keep-alive',
 'HTTP_HOST': 'localhost:5232',
 'HTTP_IF_MATCH': '"2871830486617023272"',
 'HTTP_PRAGMA': 'no-cache',
 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.34 (KHTML, like Gecko) akonadi_davgroupware_resource_1/4.12.2 Safari/534.34',
 'PATH_INFO': '/szotsaki/calendar/SDA1daf23c6-0000-0000-0000-000000000000.ics/',
 'QUERY_STRING': '',
 'REMOTE_ADDR': '127.0.0.1',
 'REMOTE_HOST': 'localhost',
 'REQUEST_METHOD': 'DELETE',
 'SCRIPT_NAME': '',
 'SERVER_NAME': 'linux-suse',
 'SERVER_PORT': '5232',
 'SERVER_PROTOCOL': 'HTTP/1.1',
 'SERVER_SOFTWARE': 'WSGIServer/0.1 Python/2.7.5',
 'wsgi.errors': <open file '/dev/null', mode 'w' at 0xcf5810>,
 'wsgi.file_wrapper': <class wsgiref.util.FileWrapper at 0xb9ec18>,
 'wsgi.input': <socket._fileobject object at 0xd4fb50>,
 'wsgi.multiprocess': False,
 'wsgi.multithread': True,
 'wsgi.run_once': False,
 'wsgi.url_scheme': 'http',
 'wsgi.version': (1, 0)}
Sanitized path: /szotsaki/calendar/SDA1daf23c6-0000-0000-0000-000000000000.ics/
szotsaki has read access to collection szotsaki/calendar/SDA1daf23c6-0000-0000-0000-000000000000.ics/
szotsaki has write access to collection szotsaki/calendar/SDA1daf23c6-0000-0000-0000-000000000000.ics/
Answer status: 412 Precondition Failed

Interestingly, from my N9 phone it works perfectly:

DELETE request at /szotsaki/calendar/SDA1e20af71-0000-0000-0000-000000000000.ics received
Request headers:
{'CONTENT_LENGTH': '',
 'CONTENT_TYPE': 'application/xml; charset="utf-8"',
 'GATEWAY_INTERFACE': 'CGI/1.1',
 'HTTP_ACCEPT_ENCODING': 'gzip',
 'HTTP_ACCEPT_LANGUAGE': 'hu-HU,en,*',
 'HTTP_AUTHORIZATION': 'Basic xxxxxxxxxxxxxxx==',
 'HTTP_CONNECTION': 'Keep-Alive',
 'HTTP_DEPTH': '1',
 'HTTP_HOST': '192.168.1.110',
 'HTTP_USER_AGENT': 'Nokia-CalDav/1.0',
 'PATH_INFO': '/szotsaki/calendar/SDA1e20af71-0000-0000-0000-000000000000.ics',
 'QUERY_STRING': '',
 'REMOTE_ADDR': '192.168.1.65',
 'REMOTE_HOST': '',
 'REQUEST_METHOD': 'DELETE',
 'SCRIPT_NAME': '',
 'SERVER_NAME': 'linux-suse',
 'SERVER_PORT': '5232',
 'SERVER_PROTOCOL': 'HTTP/1.1',
 'SERVER_SOFTWARE': 'WSGIServer/0.1 Python/2.7.5',
 'wsgi.errors': <open file '/dev/null', mode 'w' at 0xcf5810>,
 'wsgi.file_wrapper': <class wsgiref.util.FileWrapper at 0xb9ec18>,
 'wsgi.input': <socket._fileobject object at 0xd4fb50>,
 'wsgi.multiprocess': False,
 'wsgi.multithread': True,
 'wsgi.run_once': False,
 'wsgi.url_scheme': 'http',
 'wsgi.version': (1, 0)}
Sanitized path: /szotsaki/calendar/SDA1e20af71-0000-0000-0000-000000000000.ics
szotsaki has read access to item SDA1e20af71-0000-0000-0000-000000000000.ics
[...]
szotsaki has write access to item SDA1e20af71-0000-0000-0000-000000000000.ics
<?xml version="1.0"?>
<multistatus xmlns="DAV:">
  <response>
    <href>/szotsaki/calendar/SDA1e20af71-0000-0000-0000-000000000000.ics</href>
    <status>HTTP/1.1 200 OK</status>
  </response>
</multistatus>

I see 3 differences:

  • HTTP_IF_MATCH: "2871830486617023272" only in the Kontact version
  • text/plain vs. application/xml in the Content-Type
  • trailing slash at the end of the .ics path

Versions:

  • Radicale: 0.8.0
  • Kontact: 4.12.2

Maybe the fix for #73 was not full. Eg. I found in ical.py the following line (:122) which still uses the build-in hash function:

    @property
    def etag(self):
        """Item etag.

        Etag is mainly used to know if an item has changed.

        """
        return '"%s"' % hash(self.text)

Although in :427 the new hash function is used:

    @property
    def etag(self):
        """Etag from collection."""
        m = hashlib.md5()
        m.update(self.text.encode('utf-8'))
        return '"%s"' % m.hexdigest()
@szotsaki
Copy link
Author

Well, the last code snippet came from a patched version. Sorry, the bug report was against 0.7.0 and 4 months ago, that's why I thought it got into in 0.8.0.

Please, release a new version as soon as possible, because one cannot delete items from one's calendar.

@pbiering
Copy link
Collaborator

I ran into the same issue using newest Windows Phone 8 version and radicale 0.10, creation of entries works fine, but delete won't work: DEBUG: Answer status: 412 Precondition Failed

@untitaker
Copy link
Contributor

@pbiering Please post the full debug logs of Radicale (or capture them yourself with e.g. mitproxy). This bug has been fixed ages ago.

@pbiering
Copy link
Collaborator

Log from an ical entry created by Thunderbird SOGO, synced with WP and then try to delete by WP, which is not working. Server: radicale 0.10

Starting Radicale
Authentication type is None
Base URL prefix: /
Listening to :: port 8080
Radicale server ready
PROPFIND request at /test/calendar.ics/ 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': 'de,en-US;q=0.7,en;q=0.3',
 'HTTP_CACHE_CONTROL': 'no-cache',
 'HTTP_CONNECTION': 'keep-alive',
 'HTTP_DEPTH': '0',
 'HTTP_HOST': '***blanked***,
 'HTTP_PRAGMA': 'no-cache',
 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 Lightning/3.3',
 'PATH_INFO': '/test/calendar.ics/',
 'QUERY_STRING': '',
 'REMOTE_ADDR': '***blanked***,
 'REMOTE_HOST': '***blanked***,
 'REQUEST_METHOD': 'PROPFIND',
 'SCRIPT_NAME': '',
 'SERVER_NAME': '::',
 'SERVER_PORT': '8080',
 'SERVER_PROTOCOL': 'HTTP/1.1',
 'SERVER_SOFTWARE': 'WSGIServer/0.1 Python/2.7.5',
 'wsgi.errors': <open file '<stderr>', mode 'w' at 0x7fe1baddf1e0>,
 'wsgi.file_wrapper': <class wsgiref.util.FileWrapper at 0x7fe1af19dae0>,
 'wsgi.input': <socket._fileobject object at 0x7fe1aef69e50>,
 'wsgi.multiprocess': False,
 'wsgi.multithread': True,
 'wsgi.run_once': False,
 'wsgi.url_scheme': 'http',
 'wsgi.version': (1, 0)}
Sanitized path: /test/calendar.ics/
Anonymous has read access to collection test/calendar.ics/
Anonymous has write access to collection test/calendar.ics/
Request content:
<?xml version="1.0" encoding="UTF-8"?>
<D:propfind xmlns:D="DAV:" xmlns:CS="http://calendarserver.org/ns/"><D:prop><CS:getctag/></D:prop></D:propfind>
Response content:
<?xml version="1.0"?>
<multistatus xmlns="DAV:" xmlns:CS="http://calendarserver.org/ns/">
  <response>
    <href>/test/calendar.ics/</href>
    <propstat>
      <prop>
        <CS:getctag>"b51573a587c4e29d6ad3df29277c472e"</CS:getctag>
      </prop>
      <status>HTTP/1.1 200 OK</status>
    </propstat>
  </response>
</multistatus>

Answer status: 207 Unknown
PUT request at /test/calendar.ics/d6921d24-61e7-4315-9e08-cc83de81228e.ics received
Request headers:
{'CONTENT_LENGTH': '756',
 'CONTENT_TYPE': 'text/calendar; 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': 'de,en-US;q=0.7,en;q=0.3',
 'HTTP_CACHE_CONTROL': 'no-cache',
 'HTTP_CONNECTION': 'keep-alive',
 'HTTP_HOST': '***blanked***,
 'HTTP_IF_NONE_MATCH': '*',
 'HTTP_PRAGMA': 'no-cache',
 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 Lightning/3.3',
 'PATH_INFO': '/test/calendar.ics/d6921d24-61e7-4315-9e08-cc83de81228e.ics',
 'QUERY_STRING': '',
 'REMOTE_ADDR': '***blanked***,
 'REMOTE_HOST': '***blanked***,
 'REQUEST_METHOD': 'PUT',
 'SCRIPT_NAME': '',
 'SERVER_NAME': '::',
 'SERVER_PORT': '8080',
 'SERVER_PROTOCOL': 'HTTP/1.1',
 'SERVER_SOFTWARE': 'WSGIServer/0.1 Python/2.7.5',
 'wsgi.errors': <open file '<stderr>', mode 'w' at 0x7fe1baddf1e0>,
 'wsgi.file_wrapper': <class wsgiref.util.FileWrapper at 0x7fe1af19dae0>,
 'wsgi.input': <socket._fileobject object at 0x7fe1aef69e50>,
 'wsgi.multiprocess': False,
 'wsgi.multithread': True,
 'wsgi.run_once': False,
 'wsgi.url_scheme': 'http',
 'wsgi.version': (1, 0)}
Sanitized path: /test/calendar.ics/d6921d24-61e7-4315-9e08-cc83de81228e.ics
Anonymous has read access to collection test/calendar.ics/
Anonymous has write access to collection test/calendar.ics/
Request content:
BEGIN:VCALENDAR
PRODID:-//Mozilla.org/NONSGML Mozilla Calendar V1.1//EN
VERSION:2.0
BEGIN:VTIMEZONE
TZID:Europe/Berlin
X-LIC-LOCATION:Europe/Berlin
BEGIN:DAYLIGHT
TZOFFSETFROM:+0100
TZOFFSETTO:+0200
TZNAME:CEST
DTSTART:19700329T020000
RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=3
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:+0200
TZOFFSETTO:+0100
TZNAME:CET
DTSTART:19701025T030000
RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
CREATED:20150322T103924Z
LAST-MODIFIED:20150322T103929Z
DTSTAMP:20150322T103929Z
UID:d6921d24-61e7-4315-9e08-cc83de81228e
SUMMARY:t15
DTSTART;TZID=Europe/Berlin:20150323T120000
DTEND;TZID=Europe/Berlin:20150323T130000
TRANSP:OPAQUE
CLASS:PUBLIC
END:VEVENT
END:VCALENDAR

Answer status: 201 Created
REPORT request at /test/calendar.ics/ received
Request headers:
{'CONTENT_LENGTH': '260',
 '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': 'de,en-US;q=0.7,en;q=0.3',
 'HTTP_CACHE_CONTROL': 'no-cache',
 'HTTP_CONNECTION': 'keep-alive',
 'HTTP_DEPTH': '1',
 'HTTP_HOST': '***blanked***,
 'HTTP_PRAGMA': 'no-cache',
 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 Lightning/3.3',
 'PATH_INFO': '/test/calendar.ics/',
 'QUERY_STRING': '',
 'REMOTE_ADDR': '***blanked***,
 'REMOTE_HOST': '***blanked***,
 'REQUEST_METHOD': 'REPORT',
 'SCRIPT_NAME': '',
 'SERVER_NAME': '::',
 'SERVER_PORT': '8080',
 'SERVER_PROTOCOL': 'HTTP/1.1',
 'SERVER_SOFTWARE': 'WSGIServer/0.1 Python/2.7.5',
 'wsgi.errors': <open file '<stderr>', mode 'w' at 0x7fe1baddf1e0>,
 'wsgi.file_wrapper': <class wsgiref.util.FileWrapper at 0x7fe1af19dae0>,
 'wsgi.input': <socket._fileobject object at 0x7fe1aef69e50>,
 'wsgi.multiprocess': False,
 'wsgi.multithread': True,
 'wsgi.run_once': False,
 'wsgi.url_scheme': 'http',
 'wsgi.version': (1, 0)}
Sanitized path: /test/calendar.ics/
Anonymous has read access to collection test/calendar.ics/
Anonymous has write access to collection test/calendar.ics/
Anonymous has read access to item d6921d24-61e7-4315-9e08-cc83de81228e.ics
Anonymous has write access to item d6921d24-61e7-4315-9e08-cc83de81228e.ics
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>/test/calendar.ics/d6921d24-61e7-4315-9e08-cc83de81228e.ics</D:href></C:calendar-multiget>
/usr/lib/python2.7/site-packages/radicale/xmlutils.py:469: FutureWarning: The behavior of this method will change in future versions.  Use specific 'len(elem)' or 'elem is not None' test instead.
  props = [prop.tag for prop in prop_element] if prop_element else []
Response content:
<?xml version="1.0"?>
<multistatus xmlns="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
  <response>
    <href>/test/calendar.ics/d6921d24-61e7-4315-9e08-cc83de81228e.ics</href>
    <propstat>
      <prop>
        <getetag>"5010f0934ecbeea96b6d5cd249a4b59a"</getetag>
        <C:calendar-data>BEGIN:VCALENDAR
PRODID:-//Radicale//NONSGML Radicale Server//EN
VERSION:2.0
BEGIN:VTIMEZONE
TZID:Europe/Berlin
X-LIC-LOCATION:Europe/Berlin
BEGIN:DAYLIGHT
TZOFFSETFROM:+0100
TZOFFSETTO:+0200
TZNAME:CEST
DTSTART:19700329T020000
RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=3
X-RADICALE-NAME:Europe/Berlin
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:+0200
TZOFFSETTO:+0100
TZNAME:CET
DTSTART:19701025T030000
RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
X-RADICALE-NAME:Europe/Berlin
END:STANDARD
X-RADICALE-NAME:Europe/Berlin
END:VTIMEZONE
BEGIN:VEVENT
CREATED:20150322T103924Z
LAST-MODIFIED:20150322T103929Z
DTSTAMP:20150322T103929Z
UID:d6921d24-61e7-4315-9e08-cc83de81228e
SUMMARY:t15
DTSTART;TZID=Europe/Berlin:20150323T120000
DTEND;TZID=Europe/Berlin:20150323T130000
TRANSP:OPAQUE
CLASS:PUBLIC
X-RADICALE-NAME:d6921d24-61e7-4315-9e08-cc83de81228e.ics
END:VEVENT
END:VCALENDAR
</C:calendar-data>
      </prop>
      <status>HTTP/1.1 200 OK</status>
    </propstat>
  </response>
</multistatus>

Answer status: 207 Unknown
PROPFIND request at /test/ received
Request headers:
{'CONTENT_LENGTH': '144',
 'CONTENT_TYPE': 'text/xml',
 'GATEWAY_INTERFACE': 'CGI/1.1',
 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
 'HTTP_AUTHORIZATION': '***blanked***,
 'HTTP_CACHE_CONTROL': 'no-cache',
 'HTTP_CONNECTION': 'Keep-Alive',
 'HTTP_DEPTH': '0',
 'HTTP_HOST': '***blanked***,
 'HTTP_PRAGMA': 'no-cache',
 'HTTP_USER_AGENT': 'MSFT-WP/8.10.14234 (gzip)',
 'PATH_INFO': '/test/',
 'QUERY_STRING': '',
 'REMOTE_ADDR': '***blanked***,
 'REMOTE_HOST': '***blanked***,
 'REQUEST_METHOD': 'PROPFIND',
 'SCRIPT_NAME': '',
 'SERVER_NAME': '::',
 'SERVER_PORT': '8080',
 'SERVER_PROTOCOL': 'HTTP/1.1',
 'SERVER_SOFTWARE': 'WSGIServer/0.1 Python/2.7.5',
 'wsgi.errors': <open file '<stderr>', mode 'w' at 0x7fe1baddf1e0>,
 'wsgi.file_wrapper': <class wsgiref.util.FileWrapper at 0x7fe1af19dae0>,
 'wsgi.input': <socket._fileobject object at 0x7fe1aef69e50>,
 'wsgi.multiprocess': False,
 'wsgi.multithread': True,
 'wsgi.run_once': False,
 'wsgi.url_scheme': 'http',
 'wsgi.version': (1, 0)}
Sanitized path: /test/
test has read access to collection test/
test has write access to collection test/
Request content:
<?xml version="1.0" encoding="UTF-8"?><propfind xmlns="DAV:"><prop><calendar-home-set xmlns="urn:ietf:params:xml:ns:caldav" /></prop></propfind>
Response content:
<?xml version="1.0"?>
<multistatus xmlns="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
  <response>
    <href>/test/</href>
    <propstat>
      <prop>
        <C:calendar-home-set>
          <href>/test/</href>
        </C:calendar-home-set>
      </prop>
      <status>HTTP/1.1 200 OK</status>
    </propstat>
  </response>
</multistatus>

Answer status: 207 Unknown
PROPFIND request at /test/ received
Request headers:
{'CONTENT_LENGTH': '278',
 'CONTENT_TYPE': 'text/xml',
 'GATEWAY_INTERFACE': 'CGI/1.1',
 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
 'HTTP_AUTHORIZATION': '***blanked***,
 'HTTP_CACHE_CONTROL': 'no-cache',
 'HTTP_CONNECTION': 'Keep-Alive',
 'HTTP_DEPTH': '1',
 'HTTP_HOST': '***blanked***,
 'HTTP_PRAGMA': 'no-cache',
 'HTTP_USER_AGENT': 'MSFT-WP/8.10.14234 (gzip)',
 'PATH_INFO': '/test/',
 'QUERY_STRING': '',
 'REMOTE_ADDR': '***blanked***,
 'REMOTE_HOST': '***blanked***,
 'REQUEST_METHOD': 'PROPFIND',
 'SCRIPT_NAME': '',
 'SERVER_NAME': '::',
 'SERVER_PORT': '8080',
 'SERVER_PROTOCOL': 'HTTP/1.1',
 'SERVER_SOFTWARE': 'WSGIServer/0.1 Python/2.7.5',
 'wsgi.errors': <open file '<stderr>', mode 'w' at 0x7fe1baddf1e0>,
 'wsgi.file_wrapper': <class wsgiref.util.FileWrapper at 0x7fe1af19dae0>,
 'wsgi.input': <socket._fileobject object at 0x7fe1aef69e50>,
 'wsgi.multiprocess': False,
 'wsgi.multithread': True,
 'wsgi.run_once': False,
 'wsgi.url_scheme': 'http',
 'wsgi.version': (1, 0)}
Sanitized path: /test/
test has read access to collection test/
test has write access to collection test/
test has read access to collection test/calendar.ics/
test has write access to collection test/calendar.ics/
Request content:
<?xml version="1.0" encoding="UTF-8"?><propfind xmlns:cal="urn:ietf:params:xml:ns:caldav" xmlns="DAV:"><prop><getctag xmlns="http://calendarserver.org/ns/" /><resourcetype /><displayname /><cal:supported-calendar-data /><cal:supported-calendar-component-set /></prop></propfind>
Response content:
<?xml version="1.0"?>
<multistatus xmlns="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav" xmlns:CS="http://calendarserver.org/ns/">
  <response>
    <href>/test/</href>
    <propstat>
      <prop>
        <CS:getctag>"d41d8cd98f00b204e9800998ecf8427e"</CS:getctag>
        <resourcetype>
          <principal />
          <collection />
        </resourcetype>
        <displayname>test</displayname>
        <C:supported-calendar-component-set>
          <C:comp name="VTODO" />
          <C:comp name="VEVENT" />
          <C:comp name="VJOURNAL" />
        </C:supported-calendar-component-set>
      </prop>
      <status>HTTP/1.1 200 OK</status>
    </propstat>
    <propstat>
      <prop>
        <C:supported-calendar-data />
      </prop>
      <status>HTTP/1.1 404 Not Found</status>
    </propstat>
  </response>
  <response>
    <href>/test/calendar.ics/</href>
    <propstat>
      <prop>
        <CS:getctag>"50c18883fba1e7678fe8e9b328c5f5ca"</CS:getctag>
        <resourcetype>
          <C:calendar />
          <collection />
        </resourcetype>
        <displayname>calendar.ics</displayname>
        <C:supported-calendar-component-set>
          <C:comp name="VTODO" />
          <C:comp name="VEVENT" />
          <C:comp name="VJOURNAL" />
        </C:supported-calendar-component-set>
      </prop>
      <status>HTTP/1.1 200 OK</status>
    </propstat>
    <propstat>
      <prop>
        <C:supported-calendar-data />
      </prop>
      <status>HTTP/1.1 404 Not Found</status>
    </propstat>
  </response>
</multistatus>

Answer status: 207 Unknown
DELETE request at /test/calendar.ics/69a5bbfc-4897-46cd-ae01-d7384d6d3e90.ics received
Request headers:
{'CONTENT_LENGTH': '',
 'CONTENT_TYPE': 'text/plain',
 'GATEWAY_INTERFACE': 'CGI/1.1',
 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
 'HTTP_AUTHORIZATION': '***blanked***,
 'HTTP_CACHE_CONTROL': 'no-cache',
 'HTTP_CONNECTION': 'Keep-Alive',
 'HTTP_HOST': '***blanked***,
 'HTTP_IF_MATCH': '*',
 'HTTP_PRAGMA': 'no-cache',
 'HTTP_USER_AGENT': 'MSFT-WP/8.10.14234 (gzip)',
 'PATH_INFO': '/test/calendar.ics/69a5bbfc-4897-46cd-ae01-d7384d6d3e90.ics',
 'QUERY_STRING': '',
 'REMOTE_ADDR': '***blanked***,
 'REMOTE_HOST': '***blanked***,
 'REQUEST_METHOD': 'DELETE',
 'SCRIPT_NAME': '',
 'SERVER_NAME': '::',
 'SERVER_PORT': '8080',
 'SERVER_PROTOCOL': 'HTTP/1.1',
 'SERVER_SOFTWARE': 'WSGIServer/0.1 Python/2.7.5',
 'wsgi.errors': <open file '<stderr>', mode 'w' at 0x7fe1baddf1e0>,
 'wsgi.file_wrapper': <class wsgiref.util.FileWrapper at 0x7fe1af19dae0>,
 'wsgi.input': <socket._fileobject object at 0x7fe1aef69e50>,
 'wsgi.multiprocess': False,
 'wsgi.multithread': True,
 'wsgi.run_once': False,
 'wsgi.url_scheme': 'http',
 'wsgi.version': (1, 0)}
Sanitized path: /test/calendar.ics/69a5bbfc-4897-46cd-ae01-d7384d6d3e90.ics
test has read access to collection test/calendar.ics/
test has write access to collection test/calendar.ics/
Answer status: 412 Precondition Failed
PROPFIND request at /test/calendar.ics/ received
Request headers:
{'CONTENT_LENGTH': '134',
 'CONTENT_TYPE': 'text/xml',
 'GATEWAY_INTERFACE': 'CGI/1.1',
 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
 'HTTP_AUTHORIZATION': '***blanked***,
 'HTTP_CACHE_CONTROL': 'no-cache',
 'HTTP_CONNECTION': 'Keep-Alive',
 'HTTP_DEPTH': '0',
 'HTTP_HOST': '***blanked***,
 'HTTP_PRAGMA': 'no-cache',
 'HTTP_USER_AGENT': 'MSFT-WP/8.10.14234 (gzip)',
 'PATH_INFO': '/test/calendar.ics/',
 'QUERY_STRING': '',
 'REMOTE_ADDR': '***blanked***,
 'REMOTE_HOST': '***blanked***,
 'REQUEST_METHOD': 'PROPFIND',
 'SCRIPT_NAME': '',
 'SERVER_NAME': '::',
 'SERVER_PORT': '8080',
 'SERVER_PROTOCOL': 'HTTP/1.1',
 'SERVER_SOFTWARE': 'WSGIServer/0.1 Python/2.7.5',
 'wsgi.errors': <open file '<stderr>', mode 'w' at 0x7fe1baddf1e0>,
 'wsgi.file_wrapper': <class wsgiref.util.FileWrapper at 0x7fe1af19dae0>,
 'wsgi.input': <socket._fileobject object at 0x7fe1aef69e50>,
 'wsgi.multiprocess': False,
 'wsgi.multithread': True,
 'wsgi.run_once': False,
 'wsgi.url_scheme': 'http',
 'wsgi.version': (1, 0)}
Sanitized path: /test/calendar.ics/
test has read access to collection test/calendar.ics/
test has write access to collection test/calendar.ics/
Request content:
<?xml version="1.0" encoding="UTF-8"?><propfind xmlns="DAV:"><prop><getctag xmlns="http://calendarserver.org/ns/" /></prop></propfind>
Response content:
<?xml version="1.0"?>
<multistatus xmlns="DAV:" xmlns:CS="http://calendarserver.org/ns/">
  <response>
    <href>/test/calendar.ics/</href>
    <propstat>
      <prop>
        <CS:getctag>"50c18883fba1e7678fe8e9b328c5f5ca"</CS:getctag>
      </prop>
      <status>HTTP/1.1 200 OK</status>
    </propstat>
  </response>
</multistatus>

Answer status: 207 Unknown
REPORT request at /test/calendar.ics/ received
Request headers:
{'CONTENT_LENGTH': '310',
 'CONTENT_TYPE': 'text/xml',
 'GATEWAY_INTERFACE': 'CGI/1.1',
 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
 'HTTP_AUTHORIZATION': '***blanked***,
 'HTTP_CACHE_CONTROL': 'no-cache',
 'HTTP_CONNECTION': 'Keep-Alive',
 'HTTP_DEPTH': '0',
 'HTTP_HOST': '***blanked***,
 'HTTP_PRAGMA': 'no-cache',
 'HTTP_USER_AGENT': 'MSFT-WP/8.10.14234 (gzip)',
 'PATH_INFO': '/test/calendar.ics/',
 'QUERY_STRING': '',
 'REMOTE_ADDR': '***blanked***,
 'REMOTE_HOST': '***blanked***,
 'REQUEST_METHOD': 'REPORT',
 'SCRIPT_NAME': '',
 'SERVER_NAME': '::',
 'SERVER_PORT': '8080',
 'SERVER_PROTOCOL': 'HTTP/1.1',
 'SERVER_SOFTWARE': 'WSGIServer/0.1 Python/2.7.5',
 'wsgi.errors': <open file '<stderr>', mode 'w' at 0x7fe1baddf1e0>,
 'wsgi.file_wrapper': <class wsgiref.util.FileWrapper at 0x7fe1af19dae0>,
 'wsgi.input': <socket._fileobject object at 0x7fe1aef69e50>,
 'wsgi.multiprocess': False,
 'wsgi.multithread': True,
 'wsgi.run_once': False,
 'wsgi.url_scheme': 'http',
 'wsgi.version': (1, 0)}
Sanitized path: /test/calendar.ics/
test has read access to collection test/calendar.ics/
test has write access to collection test/calendar.ics/
Request content:
<?xml version="1.0" encoding="UTF-8"?><calendar-query xmlns="urn:ietf:params:xml:ns:caldav"><prop xmlns="DAV:"><getetag /></prop><filter><comp-filter name="VCALENDAR"><comp-filter name="VEVENT"><time-range start="20150308T000000Z" end="20150906T000000Z" /></comp-filter></comp-filter></filter></calendar-query>
Response content:
<?xml version="1.0"?>
<multistatus xmlns="DAV:">
  <response>
    <href>/test/calendar.ics/d6921d24-61e7-4315-9e08-cc83de81228e.ics</href>
    <propstat>
      <prop>
        <getetag>"5010f0934ecbeea96b6d5cd249a4b59a"</getetag>
      </prop>
      <status>HTTP/1.1 200 OK</status>
    </propstat>
  </response>
</multistatus>

Answer status: 207 Unknown
REPORT request at /test/calendar.ics/ received
Request headers:
{'CONTENT_LENGTH': '316',
 'CONTENT_TYPE': 'text/xml',
 'GATEWAY_INTERFACE': 'CGI/1.1',
 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
 'HTTP_AUTHORIZATION': '***blanked***,
 'HTTP_CACHE_CONTROL': 'no-cache',
 'HTTP_CONNECTION': 'Keep-Alive',
 'HTTP_DEPTH': '0',
 'HTTP_HOST': '***blanked***,
 'HTTP_PRAGMA': 'no-cache',
 'HTTP_USER_AGENT': 'MSFT-WP/8.10.14234 (gzip)',
 'PATH_INFO': '/test/calendar.ics/',
 'QUERY_STRING': '',
 'REMOTE_ADDR': '***blanked***,
 'REMOTE_HOST': '***blanked***,
 'REQUEST_METHOD': 'REPORT',
 'SCRIPT_NAME': '',
 'SERVER_NAME': '::',
 'SERVER_PORT': '8080',
 'SERVER_PROTOCOL': 'HTTP/1.1',
 'SERVER_SOFTWARE': 'WSGIServer/0.1 Python/2.7.5',
 'wsgi.errors': <open file '<stderr>', mode 'w' at 0x7fe1baddf1e0>,
 'wsgi.file_wrapper': <class wsgiref.util.FileWrapper at 0x7fe1af19dae0>,
 'wsgi.input': <socket._fileobject object at 0x7fe1aef69e50>,
 'wsgi.multiprocess': False,
 'wsgi.multithread': True,
 'wsgi.run_once': False,
 'wsgi.url_scheme': 'http',
 'wsgi.version': (1, 0)}
Sanitized path: /test/calendar.ics/
test has read access to collection test/calendar.ics/
test has write access to collection test/calendar.ics/
Request content:
<?xml version="1.0" encoding="UTF-8"?><calendar-multiget xmlns:D="DAV:" xmlns="urn:ietf:params:xml:ns:caldav"><D:prop><D:getetag /><D:getcontenttype /><calendar-data content-type="text/calendar" version="2.0" /></D:prop><D:href>/test/calendar.ics/d6921d24-61e7-4315-9e08-cc83de81228e.ics</D:href></calendar-multiget>
Response content:
<?xml version="1.0"?>
<multistatus xmlns="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
  <response>
    <href>/test/calendar.ics/d6921d24-61e7-4315-9e08-cc83de81228e.ics</href>
    <propstat>
      <prop>
        <getetag>"5010f0934ecbeea96b6d5cd249a4b59a"</getetag>
        <getcontenttype>text/calendar; component=vevent</getcontenttype>
        <C:calendar-data>BEGIN:VCALENDAR
PRODID:-//Radicale//NONSGML Radicale Server//EN
VERSION:2.0
BEGIN:VTIMEZONE
TZID:Europe/Berlin
X-LIC-LOCATION:Europe/Berlin
BEGIN:DAYLIGHT
TZOFFSETFROM:+0100
TZOFFSETTO:+0200
TZNAME:CEST
DTSTART:19700329T020000
RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=3
X-RADICALE-NAME:Europe/Berlin
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:+0200
TZOFFSETTO:+0100
TZNAME:CET
DTSTART:19701025T030000
RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
X-RADICALE-NAME:Europe/Berlin
END:STANDARD
X-RADICALE-NAME:Europe/Berlin
END:VTIMEZONE
BEGIN:VEVENT
CREATED:20150322T103924Z
LAST-MODIFIED:20150322T103929Z
DTSTAMP:20150322T103929Z
UID:d6921d24-61e7-4315-9e08-cc83de81228e
SUMMARY:t15
DTSTART;TZID=Europe/Berlin:20150323T120000
DTEND;TZID=Europe/Berlin:20150323T130000
TRANSP:OPAQUE
CLASS:PUBLIC
X-RADICALE-NAME:d6921d24-61e7-4315-9e08-cc83de81228e.ics
END:VEVENT
END:VCALENDAR
</C:calendar-data>
      </prop>
      <status>HTTP/1.1 200 OK</status>
    </propstat>
  </response>
</multistatus>

Answer status: 207 Unknown
PROPFIND request at /test/ received
Request headers:
{'CONTENT_LENGTH': '144',
 'CONTENT_TYPE': 'text/xml',
 'GATEWAY_INTERFACE': 'CGI/1.1',
 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
 'HTTP_AUTHORIZATION': '***blanked***,
 'HTTP_CACHE_CONTROL': 'no-cache',
 'HTTP_CONNECTION': 'Keep-Alive',
 'HTTP_DEPTH': '0',
 'HTTP_HOST': '***blanked***,
 'HTTP_PRAGMA': 'no-cache',
 'HTTP_USER_AGENT': 'MSFT-WP/8.10.14234 (gzip)',
 'PATH_INFO': '/test/',
 'QUERY_STRING': '',
 'REMOTE_ADDR': '***blanked***,
 'REMOTE_HOST': '***blanked***,
 'REQUEST_METHOD': 'PROPFIND',
 'SCRIPT_NAME': '',
 'SERVER_NAME': '::',
 'SERVER_PORT': '8080',
 'SERVER_PROTOCOL': 'HTTP/1.1',
 'SERVER_SOFTWARE': 'WSGIServer/0.1 Python/2.7.5',
 'wsgi.errors': <open file '<stderr>', mode 'w' at 0x7fe1baddf1e0>,
 'wsgi.file_wrapper': <class wsgiref.util.FileWrapper at 0x7fe1af19dae0>,
 'wsgi.input': <socket._fileobject object at 0x7fe1aef69e50>,
 'wsgi.multiprocess': False,
 'wsgi.multithread': True,
 'wsgi.run_once': False,
 'wsgi.url_scheme': 'http',
 'wsgi.version': (1, 0)}
Sanitized path: /test/
test has read access to collection test/
test has write access to collection test/
Request content:
<?xml version="1.0" encoding="UTF-8"?><propfind xmlns="DAV:"><prop><calendar-home-set xmlns="urn:ietf:params:xml:ns:caldav" /></prop></propfind>
Response content:
<?xml version="1.0"?>
<multistatus xmlns="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
  <response>
    <href>/test/</href>
    <propstat>
      <prop>
        <C:calendar-home-set>
          <href>/test/</href>
        </C:calendar-home-set>
      </prop>
      <status>HTTP/1.1 200 OK</status>
    </propstat>
  </response>
</multistatus>

Answer status: 207 Unknown
PROPFIND request at /test/ received
Request headers:
{'CONTENT_LENGTH': '278',
 'CONTENT_TYPE': 'text/xml',
 'GATEWAY_INTERFACE': 'CGI/1.1',
 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
 'HTTP_AUTHORIZATION': '***blanked***,
 'HTTP_CACHE_CONTROL': 'no-cache',
 'HTTP_CONNECTION': 'Keep-Alive',
 'HTTP_DEPTH': '1',
 'HTTP_HOST': '***blanked***,
 'HTTP_PRAGMA': 'no-cache',
 'HTTP_USER_AGENT': 'MSFT-WP/8.10.14234 (gzip)',
 'PATH_INFO': '/test/',
 'QUERY_STRING': '',
 'REMOTE_ADDR': '***blanked***,
 'REMOTE_HOST': '***blanked***,
 'REQUEST_METHOD': 'PROPFIND',
 'SCRIPT_NAME': '',
 'SERVER_NAME': '::',
 'SERVER_PORT': '8080',
 'SERVER_PROTOCOL': 'HTTP/1.1',
 'SERVER_SOFTWARE': 'WSGIServer/0.1 Python/2.7.5',
 'wsgi.errors': <open file '<stderr>', mode 'w' at 0x7fe1baddf1e0>,
 'wsgi.file_wrapper': <class wsgiref.util.FileWrapper at 0x7fe1af19dae0>,
 'wsgi.input': <socket._fileobject object at 0x7fe1aef69e50>,
 'wsgi.multiprocess': False,
 'wsgi.multithread': True,
 'wsgi.run_once': False,
 'wsgi.url_scheme': 'http',
 'wsgi.version': (1, 0)}
Sanitized path: /test/
test has read access to collection test/
test has write access to collection test/
test has read access to collection test/calendar.ics/
test has write access to collection test/calendar.ics/
Request content:
<?xml version="1.0" encoding="UTF-8"?><propfind xmlns:cal="urn:ietf:params:xml:ns:caldav" xmlns="DAV:"><prop><getctag xmlns="http://calendarserver.org/ns/" /><resourcetype /><displayname /><cal:supported-calendar-data /><cal:supported-calendar-component-set /></prop></propfind>
Response content:
<?xml version="1.0"?>
<multistatus xmlns="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav" xmlns:CS="http://calendarserver.org/ns/">
  <response>
    <href>/test/</href>
    <propstat>
      <prop>
        <CS:getctag>"d41d8cd98f00b204e9800998ecf8427e"</CS:getctag>
        <resourcetype>
          <principal />
          <collection />
        </resourcetype>
        <displayname>test</displayname>
        <C:supported-calendar-component-set>
          <C:comp name="VTODO" />
          <C:comp name="VEVENT" />
          <C:comp name="VJOURNAL" />
        </C:supported-calendar-component-set>
      </prop>
      <status>HTTP/1.1 200 OK</status>
    </propstat>
    <propstat>
      <prop>
        <C:supported-calendar-data />
      </prop>
      <status>HTTP/1.1 404 Not Found</status>
    </propstat>
  </response>
  <response>
    <href>/test/calendar.ics/</href>
    <propstat>
      <prop>
        <CS:getctag>"50c18883fba1e7678fe8e9b328c5f5ca"</CS:getctag>
        <resourcetype>
          <C:calendar />
          <collection />
        </resourcetype>
        <displayname>calendar.ics</displayname>
        <C:supported-calendar-component-set>
          <C:comp name="VTODO" />
          <C:comp name="VEVENT" />
          <C:comp name="VJOURNAL" />
        </C:supported-calendar-component-set>
      </prop>
      <status>HTTP/1.1 200 OK</status>
    </propstat>
    <propstat>
      <prop>
        <C:supported-calendar-data />
      </prop>
      <status>HTTP/1.1 404 Not Found</status>
    </propstat>
  </response>
</multistatus>

Answer status: 207 Unknown
DELETE request at /test/calendar.ics/d6921d24-61e7-4315-9e08-cc83de81228e.ics received
Request headers:
{'CONTENT_LENGTH': '',
 'CONTENT_TYPE': 'text/plain',
 'GATEWAY_INTERFACE': 'CGI/1.1',
 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
 'HTTP_AUTHORIZATION': '***blanked***,
 'HTTP_CACHE_CONTROL': 'no-cache',
 'HTTP_CONNECTION': 'Keep-Alive',
 'HTTP_HOST': '***blanked***,
 'HTTP_IF_MATCH': '*',
 'HTTP_PRAGMA': 'no-cache',
 'HTTP_USER_AGENT': 'MSFT-WP/8.10.14234 (gzip)',
 'PATH_INFO': '/test/calendar.ics/d6921d24-61e7-4315-9e08-cc83de81228e.ics',
 'QUERY_STRING': '',
 'REMOTE_ADDR': '***blanked***,
 'REMOTE_HOST': '***blanked***,
 'REQUEST_METHOD': 'DELETE',
 'SCRIPT_NAME': '',
 'SERVER_NAME': '::',
 'SERVER_PORT': '8080',
 'SERVER_PROTOCOL': 'HTTP/1.1',
 'SERVER_SOFTWARE': 'WSGIServer/0.1 Python/2.7.5',
 'wsgi.errors': <open file '<stderr>', mode 'w' at 0x7fe1baddf1e0>,
 'wsgi.file_wrapper': <class wsgiref.util.FileWrapper at 0x7fe1af19dae0>,
 'wsgi.input': <socket._fileobject object at 0x7fe1aef69e50>,
 'wsgi.multiprocess': False,
 'wsgi.multithread': True,
 'wsgi.run_once': False,
 'wsgi.url_scheme': 'http',
 'wsgi.version': (1, 0)}
Sanitized path: /test/calendar.ics/d6921d24-61e7-4315-9e08-cc83de81228e.ics
test has read access to collection test/calendar.ics/
test has write access to collection test/calendar.ics/
Answer status: 412 Precondition Failed
PROPFIND request at /test/calendar.ics/ received
Request headers:
{'CONTENT_LENGTH': '134',
 'CONTENT_TYPE': 'text/xml',
 'GATEWAY_INTERFACE': 'CGI/1.1',
 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
 'HTTP_AUTHORIZATION': '***blanked***,
 'HTTP_CACHE_CONTROL': 'no-cache',
 'HTTP_CONNECTION': 'Keep-Alive',
 'HTTP_DEPTH': '0',
 'HTTP_HOST': '***blanked***,
 'HTTP_PRAGMA': 'no-cache',
 'HTTP_USER_AGENT': 'MSFT-WP/8.10.14234 (gzip)',
 'PATH_INFO': '/test/calendar.ics/',
 'QUERY_STRING': '',
 'REMOTE_ADDR': '***blanked***,
 'REMOTE_HOST': '***blanked***,
 'REQUEST_METHOD': 'PROPFIND',
 'SCRIPT_NAME': '',
 'SERVER_NAME': '::',
 'SERVER_PORT': '8080',
 'SERVER_PROTOCOL': 'HTTP/1.1',
 'SERVER_SOFTWARE': 'WSGIServer/0.1 Python/2.7.5',
 'wsgi.errors': <open file '<stderr>', mode 'w' at 0x7fe1baddf1e0>,
 'wsgi.file_wrapper': <class wsgiref.util.FileWrapper at 0x7fe1af19dae0>,
 'wsgi.input': <socket._fileobject object at 0x7fe1aef69e50>,
 'wsgi.multiprocess': False,
 'wsgi.multithread': True,
 'wsgi.run_once': False,
 'wsgi.url_scheme': 'http',
 'wsgi.version': (1, 0)}
Sanitized path: /test/calendar.ics/
test has read access to collection test/calendar.ics/
test has write access to collection test/calendar.ics/
Request content:
<?xml version="1.0" encoding="UTF-8"?><propfind xmlns="DAV:"><prop><getctag xmlns="http://calendarserver.org/ns/" /></prop></propfind>
Response content:
<?xml version="1.0"?>
<multistatus xmlns="DAV:" xmlns:CS="http://calendarserver.org/ns/">
  <response>
    <href>/test/calendar.ics/</href>
    <propstat>
      <prop>
        <CS:getctag>"50c18883fba1e7678fe8e9b328c5f5ca"</CS:getctag>
      </prop>
      <status>HTTP/1.1 200 OK</status>
    </propstat>
  </response>
</multistatus>

Answer status: 207 Unknown
PROPFIND request at /test/calendar.ics/ 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': 'de,en-US;q=0.7,en;q=0.3',
 'HTTP_CACHE_CONTROL': 'no-cache',
 'HTTP_CONNECTION': 'keep-alive',
 'HTTP_DEPTH': '0',
 'HTTP_HOST': '***blanked***,
 'HTTP_PRAGMA': 'no-cache',
 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 Lightning/3.3',
 'PATH_INFO': '/test/calendar.ics/',
 'QUERY_STRING': '',
 'REMOTE_ADDR': '***blanked***,
 'REMOTE_HOST': '***blanked***,
 'REQUEST_METHOD': 'PROPFIND',
 'SCRIPT_NAME': '',
 'SERVER_NAME': '::',
 'SERVER_PORT': '8080',
 'SERVER_PROTOCOL': 'HTTP/1.1',
 'SERVER_SOFTWARE': 'WSGIServer/0.1 Python/2.7.5',
 'wsgi.errors': <open file '<stderr>', mode 'w' at 0x7fe1baddf1e0>,
 'wsgi.file_wrapper': <class wsgiref.util.FileWrapper at 0x7fe1af19dae0>,
 'wsgi.input': <socket._fileobject object at 0x7fe1aef69e50>,
 'wsgi.multiprocess': False,
 'wsgi.multithread': True,
 'wsgi.run_once': False,
 'wsgi.url_scheme': 'http',
 'wsgi.version': (1, 0)}
Sanitized path: /test/calendar.ics/
Anonymous has read access to collection test/calendar.ics/
Anonymous has write access to collection test/calendar.ics/
Request content:
<?xml version="1.0" encoding="UTF-8"?>
<D:propfind xmlns:D="DAV:" xmlns:CS="http://calendarserver.org/ns/"><D:prop><CS:getctag/></D:prop></D:propfind>
Response content:
<?xml version="1.0"?>
<multistatus xmlns="DAV:" xmlns:CS="http://calendarserver.org/ns/">
  <response>
    <href>/test/calendar.ics/</href>
    <propstat>
      <prop>
        <CS:getctag>"50c18883fba1e7678fe8e9b328c5f5ca"</CS:getctag>
      </prop>
      <status>HTTP/1.1 200 OK</status>
    </propstat>
  </response>
</multistatus>

Answer status: 207 Unknown
PROPFIND request at /test/calendar.ics/ received
Request headers:
{'CONTENT_LENGTH': '144',
 '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': 'de,en-US;q=0.7,en;q=0.3',
 'HTTP_CACHE_CONTROL': 'no-cache',
 'HTTP_CONNECTION': 'keep-alive',
 'HTTP_DEPTH': '1',
 'HTTP_HOST': '***blanked***,
 'HTTP_PRAGMA': 'no-cache',
 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 Lightning/3.3',
 'PATH_INFO': '/test/calendar.ics/',
 'QUERY_STRING': '',
 'REMOTE_ADDR': '***blanked***,
 'REMOTE_HOST': '***blanked***,
 'REQUEST_METHOD': 'PROPFIND',
 'SCRIPT_NAME': '',
 'SERVER_NAME': '::',
 'SERVER_PORT': '8080',
 'SERVER_PROTOCOL': 'HTTP/1.1',
 'SERVER_SOFTWARE': 'WSGIServer/0.1 Python/2.7.5',
 'wsgi.errors': <open file '<stderr>', mode 'w' at 0x7fe1baddf1e0>,
 'wsgi.file_wrapper': <class wsgiref.util.FileWrapper at 0x7fe1af19dae0>,
 'wsgi.input': <socket._fileobject object at 0x7fe1aef69e50>,
 'wsgi.multiprocess': False,
 'wsgi.multithread': True,
 'wsgi.run_once': False,
 'wsgi.url_scheme': 'http',
 'wsgi.version': (1, 0)}
Sanitized path: /test/calendar.ics/
Anonymous has read access to collection test/calendar.ics/
Anonymous has write access to collection test/calendar.ics/
Anonymous has read access to item d6921d24-61e7-4315-9e08-cc83de81228e.ics
Anonymous has write access to item d6921d24-61e7-4315-9e08-cc83de81228e.ics
Request content:
<?xml version="1.0" encoding="UTF-8"?>
<D:propfind xmlns:D="DAV:"><D:prop><D:getcontenttype/><D:resourcetype/><D:getetag/></D:prop></D:propfind>
Response content:
<?xml version="1.0"?>
<multistatus xmlns="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
  <response>
    <href>/test/calendar.ics/</href>
    <propstat>
      <prop>
        <getcontenttype>text/calendar</getcontenttype>
        <resourcetype>
          <C:calendar />
          <collection />
        </resourcetype>
        <getetag>"50c18883fba1e7678fe8e9b328c5f5ca"</getetag>
      </prop>
      <status>HTTP/1.1 200 OK</status>
    </propstat>
  </response>
  <response>
    <href>/test/calendar.ics/d6921d24-61e7-4315-9e08-cc83de81228e.ics</href>
    <propstat>
      <prop>
        <getcontenttype>text/calendar; component=vevent</getcontenttype>
        <resourcetype />
        <getetag>"5010f0934ecbeea96b6d5cd249a4b59a"</getetag>
      </prop>
      <status>HTTP/1.1 200 OK</status>
    </propstat>
  </response>
</multistatus>

Answer status: 207 Unknown

@untitaker
Copy link
Contributor

This patch is supposed to work:

diff --git a/radicale/__init__.py b/radicale/__init__.py
index 55329e5..ad8fbba 100644
--- a/radicale/__init__.py
+++ b/radicale/__init__.py
@@ -382,8 +382,8 @@ class Application(object):

         if item:
             # Evolution bug workaround
-            etag = environ.get("HTTP_IF_MATCH", item.etag).replace("\\", "")
-            if etag == item.etag:
+            if_match = environ.get("HTTP_IF_MATCH", "*").replace("\\", "")
+            if if_match in ("*", item.etag):
                 # No ETag precondition or precondition verified, delete item
                 answer = xmlutils.delete(environ["PATH_INFO"], collection)
                 return client.OK, {}, answer

untitaker added a commit to untitaker/Radicale that referenced this issue Mar 22, 2015
@untitaker
Copy link
Contributor

#273

@pbiering
Copy link
Collaborator

Great, this fixed this issue - thank you for the fast response!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants