From 8639f08d45d3edc8c121fbd10560cf5855adfdb7 Mon Sep 17 00:00:00 2001 From: Florian Schlichting Date: Thu, 29 Dec 2016 00:27:19 +0100 Subject: [PATCH] RFC7240: "Prefer: return=minimal" "return-minimal" was current up to and including draft -15 --- inc/CalDAVRequest.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/inc/CalDAVRequest.php b/inc/CalDAVRequest.php index f61f7733..af4224f3 100644 --- a/inc/CalDAVRequest.php +++ b/inc/CalDAVRequest.php @@ -107,7 +107,7 @@ class CalDAVRequest public $ticket; /** - * An array of values from the 'Prefer' header. At present only 'return-minimal' is acted on in any way - you + * An array of values from the 'Prefer' header. At present only 'return=minimal' is acted on in any way - you * can test that value with the PreferMinimal() method. */ private $prefer; @@ -125,7 +125,7 @@ class CalDAVRequest $this->prefer = explode( ',', $_SERVER['HTTP_PREFER']); } else if ( isset($_SERVER['HTTP_BRIEF']) && (strtoupper($_SERVER['HTTP_BRIEF']) == 'T') ) { - $this->prefer = array( 'return-minimal'); + $this->prefer = array( 'return=minimal'); } else $this->prefer = array(); @@ -926,12 +926,13 @@ EOSQL; /** - * Returns true if the 'Prefer: return-minimal' or 'Brief: t' were present in the request headers. + * Returns true if the 'Prefer: return=minimal' or 'Brief: t' were present in the request headers. */ function PreferMinimal() { if ( empty($this->prefer) ) return false; foreach( $this->prefer AS $v ) { - if ( $v == 'return-minimal' ) return true; + if ( $v == 'return=minimal' ) return true; + if ( $v == 'return-minimal' ) return true; // RFC7240 up until draft -15 (Oct 2012) } return false; }