Commit 1a6b7e3d authored by Matthew Machuga's avatar Matthew Machuga

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

This will allow the built in PHP 5.4 server to interpret PUT, DELETE, and PATCH content.

It uses the HTTP_CONTENT_TYPE variable instead of CONTENT_TYPE; Symfony hasn't adapted for this yet.
parent e684aa3c
......@@ -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