Permalink
Browse files

Merge pull request #3202 from infoza/master

Adding support for the X-HTTP-Method-Override header.
  • Loading branch information...
2 parents e5fed90 + b3617ab commit 4e8b4d183d0db9d8d10a6a315521ca5c83ded98f @samdark samdark committed Feb 5, 2014
Showing with 3 additions and 0 deletions.
  1. +1 −0 CHANGELOG
  2. +2 −0 framework/web/CHttpRequest.php
View
1 CHANGELOG
@@ -68,6 +68,7 @@ Version 1.1.15 under development
- Enh #3115: Updated phpdoc for better code completion in modern IDEs (samdark)
- Enh #3147: Updated Request::getIsSecureConnection() to work with lower and uppercase config values (cebe)
- Enh #3182: Added namespace support for controllers in subdirectories (Ekstazi, samdark)
+- Enh #3202: Adding support for the `X-HTTP-Method-Override` header in CHttpRequest (pawzar)
- Chg #3137: Upgraded HTMLPurifier to 4.6.0 (samdark)
- New #2955: Added official support for MariaDB (cebe, DaSourcerer)
View
2 framework/web/CHttpRequest.php
@@ -586,6 +586,8 @@ public function getRequestType()
{
if(isset($_POST['_method']))
return strtoupper($_POST['_method']);
+ elseif(isset($_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE']))
+ return strtoupper($_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE']);
return strtoupper(isset($_SERVER['REQUEST_METHOD'])?$_SERVER['REQUEST_METHOD']:'GET');
}

0 comments on commit 4e8b4d1

Please sign in to comment.