Remove uneeded usages of nosniff
This commit is contained in:
parent
a2a850dd91
commit
b04d95b116
3 changed files with 0 additions and 10 deletions
|
@ -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…
Reference in a new issue