From 6c50015eef5c8a5376e1130be21615ac63f5bed5 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Sat, 9 Dec 2006 15:38:16 +1300 Subject: [PATCH] Change to use 422 when we have an unsupported, but syntactically correct, request. --- inc/caldav-LOCK.php | 2 +- inc/caldav-PROPFIND.php | 2 +- inc/caldav-REPORT.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/inc/caldav-LOCK.php b/inc/caldav-LOCK.php index 85bc2087..cff8ecd9 100644 --- a/inc/caldav-LOCK.php +++ b/inc/caldav-LOCK.php @@ -98,7 +98,7 @@ if ( count($unsupported) > 0 ) { } $error = new XMLElement("error", new XMLElement( "LOCK",$badprops), array("xmlns" => "DAV:") ); - $request->DoResponse( 403, $error->Render(0,''), 'text/xml; charset="utf-8"'); + $request->DoResponse( 422, $error->Render(0,''), 'text/xml; charset="utf-8"'); } diff --git a/inc/caldav-PROPFIND.php b/inc/caldav-PROPFIND.php index 5af07e16..fd83f84c 100644 --- a/inc/caldav-PROPFIND.php +++ b/inc/caldav-PROPFIND.php @@ -318,7 +318,7 @@ if ( count($unsupported) > 0 ) { } $error = new XMLElement("error", new XMLElement( "propfind",$badprops), array("xmlns" => "DAV:") ); - $request->DoResponse( 403, $error->Render(0,''), 'text/xml; charset="utf-8"'); + $request->DoResponse( 422, $error->Render(0,''), 'text/xml; charset="utf-8"'); } elseif ( $request->AllowedTo('read') ) { diff --git a/inc/caldav-REPORT.php b/inc/caldav-REPORT.php index 661d06f8..c9033e9f 100644 --- a/inc/caldav-REPORT.php +++ b/inc/caldav-REPORT.php @@ -214,7 +214,7 @@ if ( isset($unsupported) && count($unsupported) > 0 ) { } $error = new XMLElement("error", new XMLElement( "propfind",$badprops), array("xmlns" => "DAV:") ); - $request->DoResponse( 403, $error->Render(0,''), 'text/xml; charset="utf-8"'); + $request->DoResponse( 422, $error->Render(0,''), 'text/xml; charset="utf-8"'); } else {