diff --git a/inc/iSchedule-POST.php b/inc/iSchedule-POST.php index aab2c74f..cf7fe6b4 100644 --- a/inc/iSchedule-POST.php +++ b/inc/iSchedule-POST.php @@ -82,11 +82,16 @@ if ( $d->validateRequest ( ) ) { // TODO: add originator addressbook and existing event lookup as whitelist } $method = $ical->GetPValue('METHOD'); + $content_type = explode ( ';', $_SERVER['CONTENT_TYPE'] ); if ( $content_type[0] != 'text/calendar' ) $reply->XMLResponse( 406, 'content must be text/calendar' ); + $content_parts = Array (); foreach ( $content_type as $v ) { + if ($v == 'text/calendar') + continue; + list ( $a, $b ) = explode ( '=', trim ( $v ), 2 ); $content_parts[strtolower($a)] = strtoupper($b); }