Ticket modified by Ingo Ratsdorf at 2011/03/20 11:40
Tracking System: Bugs
Category: GroupDAV
Version: Version 1.8.001
Status: Open
Resolution: None
Completed: 0%
Priority: 5 - medium
Created By: Ingo Ratsdorf
Created on: 2011/01/27 20:22
Assigned to: Ralf Becker
Summary: #2819 - groupdav returns 404 not found for empty collections - not correct
Groupdav returns a 404 error code “Not found” to caldav clients when the collection is empty. This is not correct.
According to the RFC 4791, 7.8. CALDAV:calendar-query REPORT:
The response body for a successful request MUST be a DAV:
multistatus XML element (i.e., the response uses the same format
as the response for PROPFIND). In the case where there are no
response elements, the returned DAV:multistatus XML element is
empty.
The correct return code should A collection exist (even if empty) should be
"HTTP/1.1 207 Multi-Status" not “404 Not Found”
Communication between KDE Akonadi Groupdav agent and eGroupware groupdav.php:
REPORT /groupdav.php/calendar/ HTTP/1.1
Host: groupware.envirology.co.nz
Connection: Keep-Alive
User-Agent: Mozilla/5.0 (compatible; Konqueror/4.5; Linux) KHTML/4.5.3 (like Gecko) Kubuntu
Pragma: no-cache
Cache-control: no-cache
Accept: text/html, image/jpeg;q=0.9, image/png;q=0.9, text/;q=0.9, image/;q=0.9, /;q=0.8
Accept-Encoding: x-gzip, x-deflate, gzip, deflate
Accept-Charset: utf-8, utf-8;q=0.5, *;q=0.5
Accept-Language: en-US,en;q=0.9
Content-Type: text/xml
Depth: 1
Authorization: Basic aW5nbzprdHJvbGw=
Content-Length: 384
<?xml version=“1.0” encoding=“utf-8”?>
HTTP/1.1 404 Not Found
Server: Apache
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
X-Dav-Powered-By: EGroupware 1.8.001 CalDAV/CardDAV/GroupDAV server
X-WebDAV-Status: 404 Not Found
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 20
Keep-Alive: timeout=3, max=100
Connection: Keep-Alive
Content-Type: text/html
Comment by Ingo Ratsdorf at 2011/03/20 11:40:
sorry, cannot verify currently as the groupdav client is currently on hold until Kubuntu libraries are updated to a later version of KDE.
Comment by Ralf Becker at 2011/03/07 14:41:
Hi Ingo,
I dont have a CalDAV client sending report queries other then multiget reports from Lightning.
Looking at the code empty collection are sending a "207 Multistatus" and NOT a "403 Not Found".
Only condition to get a "403 Not Found" would be a "comp-filter" with value "VTODO", which EGroupware does not support for calendars (return false in calendar/inc/class.calendar_groupdav.inc.php around line 278 in Trunk).
Can you check your trace (xml part of report request) for such a query, or post the content of the report request here.
Ralf
linked entries:
http://www.egroupware.org/egroupware/index.php?menuaction=tracker.tracker_ui.edit&tr_id=2819&no_popup=1