From c640c5c5a9988919040137aedb83eab737814a6f Mon Sep 17 00:00:00 2001 From: Sean Harvey Date: Fri, 27 Nov 2009 01:46:16 +0000 Subject: [PATCH] MINOR Removed calls to ContentNegotiator::disable() since it's disabled by default (from r93682) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@93769 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- api/RestfulServer.php | 2 -- api/SapphireSoapServer.php | 1 - core/control/ContentNegotiator.php | 3 --- tests/api/RestfulServiceTest.php | 2 -- 4 files changed, 8 deletions(-) diff --git a/api/RestfulServer.php b/api/RestfulServer.php index d566f7bf2..fed90822a 100644 --- a/api/RestfulServer.php +++ b/api/RestfulServer.php @@ -132,8 +132,6 @@ class RestfulServer extends Controller { * Since no $Action url-param is set, all requests are sent here. */ function index() { - ContentNegotiator::disable(); - if(!isset($this->urlParams['ClassName'])) return $this->notFound(); $className = $this->urlParams['ClassName']; $id = (isset($this->urlParams['ID'])) ? $this->urlParams['ID'] : null; diff --git a/api/SapphireSoapServer.php b/api/SapphireSoapServer.php index cf9dcf79b..d3a043e48 100755 --- a/api/SapphireSoapServer.php +++ b/api/SapphireSoapServer.php @@ -27,7 +27,6 @@ class SapphireSoapServer extends Controller { ); function wsdl() { - ContentNegotiator::disable(); $this->getResponse()->addHeader("Content-Type", "text/xml"); return array(); diff --git a/core/control/ContentNegotiator.php b/core/control/ContentNegotiator.php index d06eab62c..ce27e3b89 100755 --- a/core/control/ContentNegotiator.php +++ b/core/control/ContentNegotiator.php @@ -5,9 +5,6 @@ * By default, ContentNegotiator will comply to the Accept headers the clients * sends along with the HTTP request, which is most likely "application/xhtml+xml" * (see "Order of selection" below). - * - * IMPORTANT: This conversion happens by default to all template output unless - * explicitly disabled through ContentNegotiator::disable(). * * Order of selection between html or xhtml is as follows: * - if PHP has already sent the HTTP headers, default to "html" (we can't send HTTP Content-Type headers any longer) diff --git a/tests/api/RestfulServiceTest.php b/tests/api/RestfulServiceTest.php index c1f66ea1b..978cb59a5 100644 --- a/tests/api/RestfulServiceTest.php +++ b/tests/api/RestfulServiceTest.php @@ -94,7 +94,6 @@ class RestfulServiceTest extends SapphireTest { class RestfulServiceTest_Controller extends Controller { public function index() { - ContentNegotiator::disable(); BasicAuth::protect_entire_site(false); $request = ''; @@ -125,7 +124,6 @@ XML; } public function invalid() { - ContentNegotiator::disable(); BasicAuth::protect_entire_site(false); $out = <<