|
@@ -12,7 +12,7 @@ discard block |
|
|
block discarded – undo |
|
12
|
12
|
/** |
|
13
|
13
|
* Via: https://github.com/reactphp/http/pull/220#discussion_r140863176 |
|
14
|
14
|
*/ |
|
15
|
|
- $this->addType('application/json', function (ServerRequestInterface $request) { |
|
|
15
|
+ $this->addType('application/json', function(ServerRequestInterface $request) { |
|
16
|
16
|
$result = json_decode((string)$request->getBody(), true); |
|
17
|
17
|
if (!is_array($result)) { |
|
18
|
18
|
return null; |
|
@@ -23,7 +23,7 @@ discard block |
|
|
block discarded – undo |
|
23
|
23
|
/** |
|
24
|
24
|
* Via: https://github.com/reactphp/http/pull/220#discussion_r140863176 |
|
25
|
25
|
*/ |
|
26
|
|
- $xmlParser = function (ServerRequestInterface $request) { |
|
|
26
|
+ $xmlParser = function(ServerRequestInterface $request) { |
|
27
|
27
|
$backup = libxml_disable_entity_loader(true); |
|
28
|
28
|
$backup_errors = libxml_use_internal_errors(true); |
|
29
|
29
|
$result = simplexml_load_string((string)$request->getBody()); |
Please login to merge, or discard this patch.