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

Skip to content

Commit d0e4b76

Browse files
mevers47fabpot
authored andcommitted
[HttpFoundation] fixed, overwritten CONTENT_TYPE
1 parent 5bf6d7e commit d0e4b76

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Symfony/Component/HttpFoundation/Request.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,9 @@ public static function create($uri, $method = 'GET', $parameters = array(), $coo
325325
case 'POST':
326326
case 'PUT':
327327
case 'DELETE':
328-
$server['CONTENT_TYPE'] = 'application/x-www-form-urlencoded';
328+
if (!isset($server['CONTENT_TYPE'])) {
329+
$server['CONTENT_TYPE'] = 'application/x-www-form-urlencoded';
330+
}
329331
case 'PATCH':
330332
$request = $parameters;
331333
$query = array();

0 commit comments

Comments
 (0)