Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f890a3c

Browse files
committed
Merge pull request FriendsOfSymfony#24 from GromNaN/patch-1
Remove charset from the response content-type
2 parents af31c02 + b5d5f48 commit f890a3c

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lib/OAuth2/OAuth2.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1250,7 +1250,7 @@ protected function getAuthorizationHeader(Request $request) {
12501250
*/
12511251
private function getJsonHeaders() {
12521252
return array(
1253-
'Content-Type' => 'application/json;charset=UTF-8',
1253+
'Content-Type' => 'application/json',
12541254
'Cache-Control' => 'no-store',
12551255
'Pragma' => 'no-cache',
12561256
);

tests/OAuth2Test.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ public function testGrantAccessTokenWithGrantUser() {
358358
)));
359359

360360
$this->assertSame(array(
361-
'content-type' => array('application/json;charset=UTF-8'),
361+
'content-type' => array('application/json'),
362362
'cache-control' => array('no-store, private'),
363363
'pragma' => array('no-cache'),
364364
), array_diff_key(
@@ -423,7 +423,7 @@ public function testGrantAccessTokenWithGrantUserWithScope() {
423423
)));
424424

425425
$this->assertSame(array(
426-
'content-type' => array('application/json;charset=UTF-8'),
426+
'content-type' => array('application/json'),
427427
'cache-control' => array('no-store, private'),
428428
'pragma' => array('no-cache'),
429429
), array_diff_key(
@@ -457,7 +457,7 @@ public function testGrantAccessTokenWithGrantUserWithReducedScope() {
457457
)));
458458

459459
$this->assertSame(array(
460-
'content-type' => array('application/json;charset=UTF-8'),
460+
'content-type' => array('application/json'),
461461
'cache-control' => array('no-store, private'),
462462
'pragma' => array('no-cache'),
463463
), array_diff_key(
@@ -516,7 +516,7 @@ public function testGrantAccessTokenWithGrantExtension() {
516516
)));
517517

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

0 commit comments

Comments
 (0)