Remove uneeded usages of nosniff

remotes/origin/ldap_group_count
Lukas Reschke 11 years ago
parent a2a850dd91
commit b04d95b116
  1. 2
      lib/private/json.php
  2. 1
      lib/public/appframework/http/jsonresponse.php
  3. 7
      tests/lib/appframework/http/JSONResponseTest.php

@ -119,8 +119,6 @@ class OC_JSON{
* Encode and print $data in json format
*/
public static function encodedPrint($data, $setContentType=true) {
// Disable mimesniffing, don't move this to setContentTypeHeader!
header( 'X-Content-Type-Options: nosniff' );
if($setContentType) {
self::setContentTypeHeader();
}

@ -49,7 +49,6 @@ class JSONResponse extends Response {
public function __construct($data=array(), $statusCode=Http::STATUS_OK) {
$this->data = $data;
$this->setStatus($statusCode);
$this->addHeader('X-Content-Type-Options', 'nosniff');
$this->addHeader('Content-type', 'application/json; charset=utf-8');
}

@ -79,13 +79,6 @@ class JSONResponseTest extends \PHPUnit_Framework_TestCase {
$this->assertEquals($expected, $this->json->render());
}
public function testShouldHaveXContentHeaderByDefault() {
$headers = $this->json->getHeaders();
$this->assertEquals('nosniff', $headers['X-Content-Type-Options']);
}
public function testConstructorAllowsToSetData() {
$data = array('hi');
$code = 300;

Loading…
Cancel
Save