From 50fca47f0697e4fa7ad79a12661b31bc37bb14e4 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Wed, 23 Jun 2010 22:36:14 +1200 Subject: [PATCH] Correct return code on PUT modified. --- inc/caldav-PUT-default.php | 1 + inc/caldav-PUT-vcard.php | 1 + testing/tests/carddav/2005-PUT-arbitrary.result | 2 +- testing/tests/carddav/2014-PUT-vcard.result | 2 +- 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/inc/caldav-PUT-default.php b/inc/caldav-PUT-default.php index 80c6103a..f18bade1 100644 --- a/inc/caldav-PUT-default.php +++ b/inc/caldav-PUT-default.php @@ -82,4 +82,5 @@ $qry->QDo("SELECT write_sync_change( $collection_id, $response_code, :dav_name)" $qry = new AwlQuery('COMMIT'); if ( !$qry->Exec('move') ) rollback(500); +if ( $response_code == 200 ) $response_code = 204; $request->DoResponse( $response_code ); diff --git a/inc/caldav-PUT-vcard.php b/inc/caldav-PUT-vcard.php index 791a0cb2..f8241f47 100644 --- a/inc/caldav-PUT-vcard.php +++ b/inc/caldav-PUT-vcard.php @@ -92,4 +92,5 @@ $qry->QDo("SELECT write_sync_change( $collection_id, $response_code, :dav_name)" if ( !$qry->QDo('COMMIT') ) rollback(500); +if ( $response_code == 200 ) $response_code = 204; $request->DoResponse( $response_code ); diff --git a/testing/tests/carddav/2005-PUT-arbitrary.result b/testing/tests/carddav/2005-PUT-arbitrary.result index f28aa3f6..1e355e64 100644 --- a/testing/tests/carddav/2005-PUT-arbitrary.result +++ b/testing/tests/carddav/2005-PUT-arbitrary.result @@ -1,4 +1,4 @@ -HTTP/1.1 200 OK +HTTP/1.1 204 No Content Date: Dow, 01 Jan 2000 00:00:00 GMT DAV: 1, 2, access-control, calendar-access, calendar-schedule, extended-mkcol, calendar-proxy, bind, calendar-auto-schedule Content-Length: 0 diff --git a/testing/tests/carddav/2014-PUT-vcard.result b/testing/tests/carddav/2014-PUT-vcard.result index 9d14e319..3541a2b0 100644 --- a/testing/tests/carddav/2014-PUT-vcard.result +++ b/testing/tests/carddav/2014-PUT-vcard.result @@ -1,6 +1,6 @@ HTTP/1.1 100 Continue -HTTP/1.1 200 OK +HTTP/1.1 204 No Content Date: Dow, 01 Jan 2000 00:00:00 GMT DAV: 1, 2, access-control, calendar-access, calendar-schedule, extended-mkcol, calendar-proxy, bind, calendar-auto-schedule Content-Length: 0