summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
Diffstat (limited to 'system')
-rw-r--r--system/core/Input.php16
1 files changed, 15 insertions, 1 deletions
diff --git a/system/core/Input.php b/system/core/Input.php
index fae3b6c08..c3382b4d9 100644
--- a/system/core/Input.php
+++ b/system/core/Input.php
@@ -103,6 +103,8 @@ class CI_Input {
*/
protected $headers = array();
+ protected $_raw_input_stream;
+
/**
* Input stream data
*
@@ -313,7 +315,8 @@ class CI_Input {
// so we'll need to check if we have already done that first.
if ( ! is_array($this->_input_stream))
{
- parse_str(file_get_contents('php://input'), $this->_input_stream);
+ // $this->raw_input_stream will trigger __get().
+ parse_str($this->raw_input_stream, $this->_input_stream);
is_array($this->_input_stream) OR $this->_input_stream = array();
}
@@ -322,6 +325,17 @@ class CI_Input {
// ------------------------------------------------------------------------
+ public function __get($name)
+ {
+ if ($name === 'raw_input_stream')
+ {
+ isset($this->_raw_input_stream) OR $this->_raw_input_stream = file_get_contents('php://input');
+ return $this->_raw_input_stream;
+ }
+ }
+
+ // ------------------------------------------------------------------------
+
/**
* Set cookie
*