Permalink
Browse files

Adding support for the X-HTTP-Method-Override header.

  • Loading branch information...
pzaremba
pzaremba committed Feb 4, 2014
1 parent e5fed90 commit 7b689593724d231069e905c51f707e761460f43a
Showing with 2 additions and 0 deletions.
  1. +2 −0 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 7b68959

Please sign in to comment.