Commit 5e3a8de1 authored by Dayle Rees's avatar Dayle Rees

Merge pull request #1384 from machuga/patch-1

Update LaravelRequest.php to alllow PUT/DELETE/PATCH on PHP5.4 built-in server
parents e684aa3c 1a6b7e3d
......@@ -13,7 +13,8 @@ class LaravelRequest extends Request {
{
$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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment