mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR Removed calls to ContentNegotiator::disable() since it's disabled by default
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@93682 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
07e40ee91f
commit
d93ee14be1
@ -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;
|
||||
|
@ -27,7 +27,6 @@ class SapphireSoapServer extends Controller {
|
||||
);
|
||||
|
||||
function wsdl() {
|
||||
ContentNegotiator::disable();
|
||||
$this->getResponse()->addHeader("Content-Type", "text/xml");
|
||||
|
||||
return array();
|
||||
|
@ -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)
|
||||
|
@ -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 = <<<XML
|
||||
<?xml version="1.0"?>
|
||||
|
Loading…
Reference in New Issue
Block a user