|
@@ -464,7 +464,11 @@ class Request
|
|
|
$this->parseUploadFiles($http_post_boundary);
|
|
$this->parseUploadFiles($http_post_boundary);
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
- \parse_str($body_buffer, $this->_data['post']);
|
|
|
|
|
|
|
+ if (\preg_match('/\bjson\b/i', $content_type)) {
|
|
|
|
|
+ $this->_data['post'] = (array) json_decode($body_buffer, true);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ \parse_str($body_buffer, $this->_data['post']);
|
|
|
|
|
+ }
|
|
|
if ($cacheable) {
|
|
if ($cacheable) {
|
|
|
static::$_postCache[$body_buffer] = $this->_data['post'];
|
|
static::$_postCache[$body_buffer] = $this->_data['post'];
|
|
|
if (\count(static::$_postCache) > 256) {
|
|
if (\count(static::$_postCache) > 256) {
|