Index: request_handler.php =================================================================== --- request_handler.php (revision 216) +++ request_handler.php (revision 88) @@ -102,7 +102,6 @@ 'wbmp' => 'image/vnd.wap.wbmp', 'pdf' => 'application/pdf', 'zip' => 'application/x-zip', - 'Z' => 'application/x-compress', 'tar' => 'application/x-tar' ); /** @@ -205,22 +204,11 @@ $this->renderAs($controller, 'ajax'); } - if ($this->requestedWith('Z')) { - $compressedInput = file_get_contents("php://input"); - $f = tempnam('/tmp', 'gz_fix'); - file_put_contents($f, "\x1f\x8b\x08\x00\x00\x00\x00\x00" . $compressedInput); - $fixedCompressedInput = file_get_contents('compress.zlib://' . $f); - - $requestContents = trim($fixedCompressedInput); - } else { - $requestContents = trim(file_get_contents('php://input')); - } - - if ($this->requestedWith('xml') || simplexml_load_string($requestContents)) { + if ($this->requestedWith('xml')) { if (!class_exists('XmlNode')) { App::import('Core', 'Xml'); } - $xml = new Xml($requestContents); + $xml = new Xml(trim(file_get_contents('php://input'))); if (is_object($xml->child('data')) && count($xml->children) == 1) { $controller->data = $xml->child('data');