Merge pull request #1384 from machuga/patch-1
Update LaravelRequest.php to alllow PUT/DELETE/PATCH on PHP5.4 built-in server
This commit is contained in:
commit
5e3a8de1ba
|
@ -13,7 +13,8 @@ static public function createFromGlobals()
|
|||
{
|
||||
$request = new static($_GET, $_POST, array(), $_COOKIE, $_FILES, $_SERVER);
|
||||
|
||||
if (0 === strpos($request->server->get('CONTENT_TYPE'), 'application/x-www-form-urlencoded')
|
||||
if ((0 === strpos($request->server->get('CONTENT_TYPE'), 'application/x-www-form-urlencoded')
|
||||
|| (0 === strpos($request->server->get('HTTP_CONTENT_TYPE'), 'application/x-www-form-urlencoded')))
|
||||
&& in_array(strtoupper($request->server->get('REQUEST_METHOD', 'GET')), array('PUT', 'DELETE', 'PATCH'))
|
||||
) {
|
||||
parse_str($request->getContent(), $data);
|
||||
|
|
Loading…
Reference in New Issue