Skip to content

Commit 5e3a8de

Browse files
committed
Merge pull request laravel#1384 from machuga/patch-1
Update LaravelRequest.php to alllow PUT/DELETE/PATCH on PHP5.4 built-in server
2 parents e684aa3 + 1a6b7e3 commit 5e3a8de

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

laravel/vendor/Symfony/Component/HttpFoundation/LaravelRequest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ static public function createFromGlobals()
1313
{
1414
$request = new static($_GET, $_POST, array(), $_COOKIE, $_FILES, $_SERVER);
1515

16-
if (0 === strpos($request->server->get('CONTENT_TYPE'), 'application/x-www-form-urlencoded')
16+
if ((0 === strpos($request->server->get('CONTENT_TYPE'), 'application/x-www-form-urlencoded')
17+
|| (0 === strpos($request->server->get('HTTP_CONTENT_TYPE'), 'application/x-www-form-urlencoded')))
1718
&& in_array(strtoupper($request->server->get('REQUEST_METHOD', 'GET')), array('PUT', 'DELETE', 'PATCH'))
1819
) {
1920
parse_str($request->getContent(), $data);

0 commit comments

Comments
 (0)