|
@@ -16,7 +16,7 @@ discard block |
|
|
block discarded – undo |
|
16
|
16
|
/** |
|
17
|
17
|
* Via: https://github.com/reactphp/http/pull/220#discussion_r140863176 |
|
18
|
18
|
*/ |
|
19
|
|
- $this->addType('application/json', function (ServerRequestInterface $request) { |
|
|
19
|
+ $this->addType('application/json', function(ServerRequestInterface $request) { |
|
20
|
20
|
$result = json_decode((string)$request->getBody(), true); |
|
21
|
21
|
if (!is_array($result)) { |
|
22
|
22
|
return $request; |
|
@@ -27,7 +27,7 @@ discard block |
|
|
block discarded – undo |
|
27
|
27
|
/** |
|
28
|
28
|
* Via: https://github.com/reactphp/http/pull/220#discussion_r140863176 |
|
29
|
29
|
*/ |
|
30
|
|
- $xmlParser = function (ServerRequestInterface $request) { |
|
|
30
|
+ $xmlParser = function(ServerRequestInterface $request) { |
|
31
|
31
|
$backup = libxml_disable_entity_loader(true); |
|
32
|
32
|
$backup_errors = libxml_use_internal_errors(true); |
|
33
|
33
|
$result = simplexml_load_string((string)$request->getBody()); |
Please login to merge, or discard this patch.