Hi Robert,
the server answered 201 AND send a Location header with the id/path of
the new entry:
case ‘PUT’:
if (($ok = $handler->check_perms(EGW_ACL_EDIT,$id)) === false)
{
error_log(“icalsrv_groupdav::_addressbook_get_put_delete($method,$id)
403 Forbidden: check_perms(EGW_ACL_EDIT,$id)==false”);
return ‘403 Forbidden’;
}
$contact = $handler->vcardtoegw($options[‘content’]);
if (!is_null($ok)) $contact[‘id’] = $id;
if (!$handler->save($contact)) return false;
header('ETag: "'.$contact['id'].':'.$contact['modified'].'"');
if (is_null($ok))
{
header($h'Location: '.$this->base_uri.'/addressbook/'.$contact['id']);
error_log(“icalsrv_groupdav::_addressbook_get_put_delete($method,$id)
header(’$h’): 201 Created”);
return ‘201 Created’;
}
return true;
Robert Bolduc schrieb:
Hi Ralph,
For a successful PUT operation the correct response is supposed to be
201. It seems the server is responding 403 (forbidden). Is there a
reason for that response code?
The 403 in the logfile of the guy on the user list, might be from an
older version of the addressbook, in which check_perm() returns false
for both: a non-existing entry and if you have no permission.
This log is from my own development box. It differs only in the
additional error_log statement for the successful adding of the entry:
[Sat Oct 20 07:44:05 2007] [error] [client 127.0.0.1]
icalsrv_groupdav::PROPFIND(Array\n(\n [path] => /addressbook/\n
[depth] => infinity\n [props] => all\n)\n)
[Sat Oct 20 07:44:05 2007] [error] [client 127.0.0.1]
icalsrv_groupdav::PROPFIND: user=, app=‘addressbook’, rest=
[Sat Oct 20 07:44:06 2007] [error] [client 127.0.0.1]
icalsrv_groupdav::PUT(Array\n(\n [path] =>
/addressbook/AA-7ec9cac4-b9f7-f01a-8e\n [content_length] => 206\n
[content_type] => text/x-vcard; charset=UTF-8\n [stream] => Resource
id #91\n [content] =>
BEGIN:VCARD\r\nVERSION:3.0\r\nUID:AA-7ec9cac4-b9f7-f01a-8e\r\nN:Nachbird;Vorthunder\r\nFN:Vorthunder
Nachbird\r\nNICKNAME:email\r\nADR;TYPE=work:;;;;;;\r\nADR;TYPE=home:;;;;;;\r\nEMAIL;TYPE=work:group@dav.de\r\nEND:VCARD\r\n\r\n\n)\n),
referer:
http://localhost/egroupware/icalsrv/groupdav.php/addressbook/AA-7ec9cac4-b9f7-f01a-8e
[Sat Oct 20 07:44:06 2007] [error] [client 127.0.0.1]
icalsrv_groupdav::_addressbook_get_put_delete(PUT,AA-7ec9cac4-b9f7-f01a-8e)
header(‘Location:
http://localhost/egroupware/icalsrv/groupdav.php/addressbook/1620’): 201
Created, referer:
http://localhost/egroupware/icalsrv/groupdav.php/addressbook/AA-7ec9cac4-b9f7-f01a-8e
The entry is shown then in Thunderbird, but it failed to recognice the
new location, as you can see when I hit the Sync button direct after:
[Sat Oct 20 07:44:50 2007] [error] [client 127.0.0.1]
icalsrv_groupdav::PROPFIND(Array\n(\n [path] => /addressbook/\n
[depth] => infinity\n [props] => all\n)\n)
[Sat Oct 20 07:44:50 2007] [error] [client 127.0.0.1]
icalsrv_groupdav::PROPFIND: user=, app=‘addressbook’, rest=
Thunderbird requests the new entry via GET:
[Sat Oct 20 07:44:50 2007] [error] [client 127.0.0.1]
icalsrv_groupdav::GET(Array\n(\n [path] => /addressbook/1620\n)\n)
And now I have 2 new entries with the same content, thought I cant
delete the one with the wrong id, as it does not exist on the server.
Anyway thanks for the nice plugin and helping debuging the GroupDAV code

Ralf
Ralf Becker
eGroupWare Training & Support ==> http://www.egroupware-support.de
Outdoor Unlimited Training GmbH [www.outdoor-training.de]
Handelsregister HRB Kaiserslautern 3587
Geschäftsführer Birgit und Ralf Becker
Leibnizstr. 17, 67663 Kaiserslautern, Germany
Telefon +49 (0)631 31657-0
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
eGroupWare-users mailing list
eGroupWare-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-users