From 88c57486d9fcda4cfe38bdfa1de7b945f9d4c9dc Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Mon, 29 Mar 2010 12:37:32 +1300 Subject: [PATCH] Load the content_type into an internal variable. --- inc/CalDAVRequest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/CalDAVRequest.php b/inc/CalDAVRequest.php index d4dd4e22..bc8b2033 100644 --- a/inc/CalDAVRequest.php +++ b/inc/CalDAVRequest.php @@ -163,7 +163,7 @@ class CalDAVRequest $_SERVER['REQUEST_METHOD'] = $_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE']; } $this->method = $_SERVER['REQUEST_METHOD']; - + $this->content_type = (isset($_SERVER['CONTENT_TYPE']) ? $_SERVER['CONTENT_TYPE'] : null); $this->user_agent = ((isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : "Probably Mulberry")); /** @@ -496,7 +496,7 @@ EOSQL; * If the content we are receiving is XML then we parse it here. RFC2518 says we * should reasonably expect to see either text/xml or application/xml */ - if ( isset($_SERVER['CONTENT_TYPE']) && preg_match( '#(application|text)/xml#', $_SERVER['CONTENT_TYPE'] ) ) { + if ( isset($this->content_type) && preg_match( '#(application|text)/xml#', $this->content_type ) ) { $xml_parser = xml_parser_create_ns('UTF-8'); $this->xml_tags = array(); xml_parser_set_option ( $xml_parser, XML_OPTION_SKIP_WHITE, 1 );