Commits

Jérôme Tamarelle  committed b5d5f48

Remove charset from the response content-type

This is not required as JSON use UTF-8 by default (see RFC4627).
Make it homogeneous with error responses.

  • Participants
  • Parent commits e56ce04

Comments (0)

Files changed (2)

File lib/OAuth2/OAuth2.php

    */
   private function getJsonHeaders() {
     return array(
-      'Content-Type' => 'application/json;charset=UTF-8',
+      'Content-Type' => 'application/json',
       'Cache-Control' => 'no-store',
       'Pragma' => 'no-cache',
     );

File tests/OAuth2Test.php

     )));
 
     $this->assertSame(array(
-      'content-type' => array('application/json;charset=UTF-8'),
+      'content-type' => array('application/json'),
       'cache-control' => array('no-store, private'),
       'pragma' => array('no-cache'),
     ), array_diff_key(
     )));
 
     $this->assertSame(array(
-      'content-type' => array('application/json;charset=UTF-8'),
+      'content-type' => array('application/json'),
       'cache-control' => array('no-store, private'),
       'pragma' => array('no-cache'),
     ), array_diff_key(
     )));
 
     $this->assertSame(array(
-      'content-type' => array('application/json;charset=UTF-8'),
+      'content-type' => array('application/json'),
       'cache-control' => array('no-store, private'),
       'pragma' => array('no-cache'),
     ), array_diff_key(
     )));
 
     $this->assertSame(array(
-      'content-type' => array('application/json;charset=UTF-8'),
+      'content-type' => array('application/json'),
       'cache-control' => array('no-store, private'),
       'pragma' => array('no-cache'),
     ), array_diff_key(