From 1a6b7e3d733b984082754d39f94f09199a28d860 Mon Sep 17 00:00:00 2001 From: Matthew Machuga Date: Wed, 24 Oct 2012 14:41:58 -0300 Subject: [PATCH] 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. --- .../vendor/Symfony/Component/HttpFoundation/LaravelRequest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/laravel/vendor/Symfony/Component/HttpFoundation/LaravelRequest.php b/laravel/vendor/Symfony/Component/HttpFoundation/LaravelRequest.php index 4eb7ea3f..7b0d4672 100644 --- a/laravel/vendor/Symfony/Component/HttpFoundation/LaravelRequest.php +++ b/laravel/vendor/Symfony/Component/HttpFoundation/LaravelRequest.php @@ -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);