[kronolith] Kronolith 3.0.9 : Remote calendar : error davical

Jan Schneider jan at horde.org
Thu Sep 15 13:56:50 UTC 2011


Zitat von Gerard Breiner <gerard.breiner at ias.u-psud.fr>:

> Le 15/09/2011 14:30, Jan Schneider a écrit :
>>
>> Zitat von Gerard Breiner <gerard.breiner at ias.u-psud.fr>:
>>
>>> Le 14/09/2011 13:06, Jan Schneider a écrit :
>>>>
>>>> Zitat von Gerard Breiner <gerard.breiner at ias.u-psud.fr>:
>>>>
>>>>> Le 14/09/2011 11:24, Jan Schneider a écrit :
>>>>>>
>>>>>> Zitat von Gerard Breiner <gerard.breiner at ias.u-psud.fr>:
>>>>>>
>>>>>>> Hello,
>>>>>>>
>>>>>>> I use kronolith 3.0.9 under horde 4.0.8. My server caldav is  
>>>>>>> davical version 0.9.9.3 . I created a remote calendar toward  
>>>>>>> my server davical  
>>>>>>> (https://calendar.domain/caldav.php/username/agenda). When  I  
>>>>>>> try to add an event from kronolith (client) to davical  
>>>>>>> (server) I get the error
>>>>>>> "The event could not be added to the remote server".
>>>>>>>
>>>>>>> The davical's logs says the content type is incorrect... It  
>>>>>>> seems that expect to have xml content but is not.
>>>>>>> Does caldav is full supported by kronolith 3.0.9 ?
>>>>>>
>>>>>> Yes.
>>>>>>
>>>>>>> Any help would be appreciated.
>>>>>>>
>>>>>>> Thanks in advance
>>>>>>>
>>>>>>> Gerard Breiner
>>>>>>>
>>>>>>> [LOGS]
>>>>>>> [Mon Sep 12 11:21:32 2011] [error] [client x.x.x.x] DAViCal:  
>>>>>>> LOG: NOTICE:Unusual content-type of "(null)" and first word of  
>>>>>>> content is ""
>>>>>>> [Mon Sep 12 11:21:32 2011] [error] [client x.x.x.x] DAViCal:  
>>>>>>> LOG: :***************** Response Header ****************
>>>>>>> [Mon Sep 12 11:21:32 2011] [error] [client x.x.x.x] DAViCal:  
>>>>>>> LOG: headers:-->X-Powered-By: PHP/5.3.3-7+squeeze1
>>>>>>> [Mon Sep 12 11:21:32 2011] [error] [client x.x.x.x] DAViCal:  
>>>>>>> LOG: headers:-->Server: 0.9
>>>>>>> [Mon Sep 12 11:21:32 2011] [error] [client x.x.x.x] DAViCal:  
>>>>>>> LOG: headers:-->DAV: 1, 2, 3, access-control, calendar-access,  
>>>>>>> calendar-schedule
>>>>>>> [Mon Sep 12 11:21:32 2011] [error] [client x.x.x.x] DAViCal:  
>>>>>>> LOG: headers:-->DAV: extended-mkcol, calendar-proxy, bind,  
>>>>>>> addressbook
>>>>>>> [Mon Sep 12 11:21:32 2011] [error] [client x.x.x.x] DAViCal:  
>>>>>>> LOG: headers:-->X-DAViCal-Version: DAViCal/0.9.9; DB/1.2.9
>>>>>>> [Mon Sep 12 11:21:32 2011] [error] [client x.x.x.x] DAViCal:  
>>>>>>> LOG: headers:-->Content-type: text/xml; charset="utf-8"
>>>>>>> [Mon Sep 12 11:21:32 2011] [error] [client x.x.x.x] DAViCal:  
>>>>>>> LOG: :******************** Response ********************
>>>>>>> [Mon Sep 12 11:21:32 2011] [error] [client x.x.x.x] DAViCal:  
>>>>>>> LOG: response:--><?xml version="1.0" encoding="utf-8" ?>
>>>>>>> [Mon Sep 12 11:21:32 2011] [error] [client x.x.x.x] DAViCal:  
>>>>>>> LOG: response:--><error xmlns="DAV:">
>>>>>>> [Mon Sep 12 11:21:32 2011] [error] [client x.x.x.x] DAViCal:  
>>>>>>> LOG: response:-->  
>>>>>>> <urn:ietf:params:xml:ns:caldav:supported-calendar-data/>Incorrect  
>>>>>>> content type for calendar:
>>>>>>> [Mon Sep 12 11:21:32 2011] [error] [client x.x.x.x] DAViCal:  
>>>>>>> LOG: response:--></error>
>>>>>>> [LOGS]
>>>>>>
>>>>>> If possible, try to trace the communication between Kronolith  
>>>>>> and DAViCal.
>>>>> By using firebug ?
>>>>
>>>> No, Firebug only traces the communication between the browser and  
>>>> Kronolith. Use something like wireshark.
>>>>
>>>>>> Jan.
>>>>>>
>>>>>
>>>>> However, I've just made a try and the good news is it works very  
>>>>> fine IF I comment in kronolith/lib/Driver/Ical.php the lines :
>>>>>
>>>>> [CODE]
>>>>> 435          if (!in_array($response->code, array(200, 201, 204))) {
>>>>> 436             Horde::logMessage(sprintf('Failed to create  
>>>>> event on remote calendar: url = "%s", status = %s',
>>>>> 437                                       $url,  
>>>>> $response->code), 'INFO');
>>>>> 438             throw new Kronolith_Exception(_("The event could  
>>>>> not be added to the remote server."));
>>>>> 439
>>>>> [CODE]
>>>>
>>>> If commenting this out worked, you have a log entry in the horde  
>>>> log that you didn't mention.
>>>>
>>> Here is :
>>> INFO: HORDE4 [kronolith] Failed to create event on remote  
>>> calendar: url = "", status = 412 [pid 16916 on line 437 of  
>>> "/www/horde4/kronolith/lib/Driver/Ical.php"]
>>
>> Response status 412 means that a precondition failed while PUTing  
>> the event on the server. Unfortunately we don't read the  
>> precondition error message yet. Can you check if davical logs some  
>> error message?
>>
>> Jan.
>>
> Yes, davical logs some error message.... it is in my first request  
> to the list :
> [LOGS]
> [Mon Sep 12 11:21:32 2011] [error] [client x.x.x.x] DAViCal: LOG:  
> NOTICE:Unusual content-type of "(null)" and first word of content is  
> ""
> [Mon Sep 12 11:21:32 2011] [error] [client x.x.x.x] DAViCal: LOG:  
> :***************** Response Header ****************
> [Mon Sep 12 11:21:32 2011] [error] [client x.x.x.x] DAViCal: LOG:  
> headers:-->X-Powered-By: PHP/5.3.3-7+squeeze1
> [Mon Sep 12 11:21:32 2011] [error] [client x.x.x.x] DAViCal: LOG:  
> headers:-->Server: 0.9
> [Mon Sep 12 11:21:32 2011] [error] [client x.x.x.x] DAViCal: LOG:  
> headers:-->DAV: 1, 2, 3, access-control, calendar-access,  
> calendar-schedule
> [Mon Sep 12 11:21:32 2011] [error] [client x.x.x.x] DAViCal: LOG:  
> headers:-->DAV: extended-mkcol, calendar-proxy, bind, addressbook
> [Mon Sep 12 11:21:32 2011] [error] [client x.x.x.x] DAViCal: LOG:  
> headers:-->X-DAViCal-Version: DAViCal/0.9.9; DB/1.2.9
> [Mon Sep 12 11:21:32 2011] [error] [client x.x.x.x] DAViCal: LOG:  
> headers:-->Content-type: text/xml; charset="utf-8"
> [Mon Sep 12 11:21:32 2011] [error] [client x.x.x.x] DAViCal: LOG:  
> :******************** Response ********************
> [Mon Sep 12 11:21:32 2011] [error] [client x.x.x.x] DAViCal: LOG:  
> response:--><?xml version="1.0" encoding="utf-8" ?>
> [Mon Sep 12 11:21:32 2011] [error] [client x.x.x.x] DAViCal: LOG:  
> response:--><error xmlns="DAV:">
> [Mon Sep 12 11:21:32 2011] [error] [client x.x.x.x] DAViCal: LOG:  
> response:-->  
> <urn:ietf:params:xml:ns:caldav:supported-calendar-data/>Incorrect  
> content type for calendar:
> [Mon Sep 12 11:21:32 2011] [error] [client x.x.x.x] DAViCal: LOG:  
> response:--></error>
> [LOGS]

We explicitely set the Content-Type header to text/calendar.

Jan.

-- 
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/



More information about the kronolith mailing list