Commit 2681dbcf authored by Bong Cosca's avatar Bong Cosca
Browse files

Allow Spring-style HTTP method overrides

parent 0680b896
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1481,6 +1481,8 @@ final class Base {
						substr($key,5),'_',' '))),' ','-')]=&$_SERVER[$key];
		if (isset($headers['X-HTTP-Method-Override']))
			$_SERVER['REQUEST_METHOD']=$headers['X-HTTP-Method-Override'];
		elseif ($_SERVER['REQUEST_METHOD']=='POST' && isset($_POST['_method']))
			$_SERVER['REQUEST_METHOD']=$_POST['_method'];
		$scheme=isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']=='on' ||
			isset($headers['X-Forwarded-Proto']) &&
			$headers['X-Forwarded-Proto']=='https'?'https':'http';