Set HTTP method before initializing InputHandler

This is needed because without it the InputHandler doesn't know which http method is being used, and because of that it can't parse the body of a PUT request
This commit is contained in:
Matheus
2018-11-10 22:16:45 -02:00
committed by GitHub
parent 1395527cc6
commit d4a6d504b1
+3 -2
View File
@@ -84,7 +84,8 @@ class Request
// Check if special IIS header exist, otherwise use default.
$this->setUrl(new Url($this->getHeader('unencoded-url', $this->getHeader('request-uri'))));
$this->method = strtolower($this->getHeader('request-method'));
$this->inputHandler = new InputHandler($this);
$this->method = strtolower($this->inputHandler->value('_method', $this->getHeader('request-method')));
}
@@ -425,4 +426,4 @@ class Request
return $this->data[$name] ?? null;
}
}
}