Permalink
Browse files

Fix runTests. Fix backward compat for XML responses (use text/xml, ad…

…d XML version declaration).
  • Loading branch information...
1 parent 7346232 commit 1ec0ad7d667259afd5f8e82dd3be9ea8a03dd7d7 @cdujeu cdujeu committed May 12, 2016
@@ -81,7 +81,7 @@ public static function handleRequest(ServerRequestInterface &$request, ResponseI
$response = $response->withHeader("Content-type", "application/json; charset=UTF-8");
}else{
$response->getBody()->setSerializer(SerializableResponseStream::SERIALIZER_TYPE_XML);
- $response = $response->withHeader("Content-type", "application/xml; charset=UTF-8");
+ $response = $response->withHeader("Content-type", "text/xml; charset=UTF-8");
}
}
@@ -23,10 +23,6 @@
use Psr\Http\Message\StreamInterface;
use Pydio\Core\Controller\XMLWriter;
-use Pydio\Core\Http\Response\JSONSerializableResponseChunk;
-use Pydio\Core\Http\Response\SerializableResponseChunk;
-use Pydio\Core\Http\Response\XMLDocSerializableResponseChunk;
-use Pydio\Core\Http\Response\XMLSerializableResponseChunk;
defined('AJXP_EXEC') or die('Access not allowed');
@@ -105,7 +101,7 @@ protected function serializeData($data, $serializer){
if($wrap){
return XMLWriter::wrapDocument($buffer);
}else{
- return $buffer;
+ return "<?xml version=\"1.0\" encoding=\"UTF-8\"?>".$buffer;
}
}
return "";
@@ -30,6 +30,7 @@
die("You are not allowed to see this page (comment first line of the file to access it!)");
require_once("base.conf.php");
+require_once AJXP_BIN_FOLDER."/lib/HttpClient.php";
function apiPost($baseData, $url, $parameters, $private){

0 comments on commit 1ec0ad7

Please sign in to comment.