issue 2596 fixed a bug that check a real request method when upload files.

git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@11787 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
devjin 2012-10-18 13:16:38 +00:00
parent 1cc9920274
commit 8c570adeff

View file

@ -851,6 +851,7 @@ class Context {
if($this->getRequestMethod()=='GET'&&isset($_GET[$key])) $set_to_vars = true;
elseif($this->getRequestMethod()=='POST'&&isset($_POST[$key])) $set_to_vars = true;
elseif($this->getRequestMethod()=='JS_CALLBACK' && (isset($_GET[$key]) || isset($_POST[$key]))) $set_to_vars = true;
else $set_to_vars = false;
if($set_to_vars)
@ -969,7 +970,7 @@ class Context {
* @return void
*/
function _setUploadedArgument() {
if($this->getRequestMethod() != 'POST') return;
if($_SERVER['REQUEST_METHOD'] != 'POST') return;
if(!preg_match('/multipart\/form-data/i',$_SERVER['CONTENT_TYPE'])) return;
if(!$_FILES) return;