Compare commits

...

3 Commits

Author SHA1 Message Date
Nick v H
eabd7d3ae0 Merge branch 'master' into 'master'
Enclose XML response to only contain the XML tags (trimming any possible...

See merge request davical-project/davical!82
2025-05-02 20:01:25 +00:00
malve
fc4f6013db correctly emit error message when cancelling an event fails 2025-04-13 14:54:45 -07:00
Nick v H
5920fe1efe Enclose XML response to only contain the XML tags (trimming any possible trailing characters after the last XML tag) 2021-09-20 19:04:42 +00:00
2 changed files with 3 additions and 2 deletions

View File

@ -119,12 +119,13 @@ class CalDAVClient {
*/
function ParseResponse( $response ) {
$pos = strpos($response, '<?xml');
$epos = strrpos($response, '>');
if ($pos === false) {
$this->httpResponse = trim($response);
}
else {
$this->httpResponse = trim(substr($response, 0, $pos));
$this->xmlResponse = trim(substr($response, $pos));
$this->xmlResponse = trim(substr($response, $pos, $epos-$pos+1));
}
}

View File

@ -312,7 +312,7 @@ function processItipCancel( vCalendar $vcal, vProperty $attendee, WritableCollec
if ( $attendee_calendar->actualDeleteCalendarMember($row->dav_name) === false ) {
dbg_error_log('ERROR', 'Could not delete calendar member %s for %s',
$row->dav_name(), $attendee->Value());
$row->dav_name, $attendee->Value());
trace_bug('Failed to write scheduling resource.');
return '5.2';
}