mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-08-24 17:36:39 +00:00
Switch to 412 precondition failed in line with CardDAV RFC.
This commit is contained in:
parent
2f38cf077b
commit
e7ad2ab06d
@ -26,10 +26,12 @@ $dest = new DAVResource($request->path);
|
||||
|
||||
$container = $dest->FetchParentContainer();
|
||||
if ( $container->IsCalendar() ) {
|
||||
$request->DoResponse( 409, translate('Incorrect content type for calendar: ') . $request->content_type );
|
||||
$request->PreconditionFailed(412,'urn:ietf:params:xml:ns:caldav:supported-calendar-data',
|
||||
translate('Incorrect content type for calendar: ') . $request->content_type );
|
||||
}
|
||||
else if ( $container->IsAddressbook() ) {
|
||||
$request->DoResponse( 409, translate('Incorrect content type for addressbook: ') . $request->content_type );
|
||||
$request->PreconditionFailed(412,'urn:ietf:params:xml:ns:carddav:supported-address-data',
|
||||
translate('Incorrect content type for addressbook: ') . $request->content_type );
|
||||
}
|
||||
if ( ! $dest->Exists() ) {
|
||||
if ( $container->IsPrincipal() ) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user