aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/private/json.php2
-rw-r--r--lib/public/appframework/http/jsonresponse.php1
-rw-r--r--tests/lib/appframework/http/JSONResponseTest.php7
3 files changed, 0 insertions, 10 deletions
diff --git a/lib/private/json.php b/lib/private/json.php
index 4ccdb490a6c..34f81c3b8cf 100644
--- a/lib/private/json.php
+++ b/lib/private/json.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();
}
diff --git a/lib/public/appframework/http/jsonresponse.php b/lib/public/appframework/http/jsonresponse.php
index 6628c4514d9..6d029b7464a 100644
--- a/lib/public/appframework/http/jsonresponse.php
+++ b/lib/public/appframework/http/jsonresponse.php
@@ -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');
}
diff --git a/tests/lib/appframework/http/JSONResponseTest.php b/tests/lib/appframework/http/JSONResponseTest.php
index b9b7c7d6382..fbaae1b9227 100644
--- a/tests/lib/appframework/http/JSONResponseTest.php
+++ b/tests/lib/appframework/http/JSONResponseTest.php
@@ -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;