web/lib/Zend/Service/Amazon/Ec2/Response.php
changeset 1230 68c69c656a2c
parent 807 877f952ae2bd
equal deleted inserted replaced
1229:5a6b6e770365 1230:68c69c656a2c
    13  * to license@zend.com so we can send you a copy immediately.
    13  * to license@zend.com so we can send you a copy immediately.
    14  *
    14  *
    15  * @category   Zend
    15  * @category   Zend
    16  * @package    Zend_Service_Amazon
    16  * @package    Zend_Service_Amazon
    17  * @subpackage Ec2
    17  * @subpackage Ec2
    18  * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
    18  * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
    19  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    19  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    20  * @version    $Id: Response.php 24593 2012-01-05 20:35:02Z matthew $
    20  * @version    $Id$
    21  */
    21  */
    22 
    22 
    23 /**
    23 /**
    24  * @see Zend_Http_Response
    24  * @see Zend_Http_Response
    25  */
    25  */
    26 require_once 'Zend/Http/Response.php';
    26 require_once 'Zend/Http/Response.php';
    27 
    27 
       
    28 /** @see Zend_Xml_Security */
       
    29 require_once 'Zend/Xml/Security.php';
       
    30 
    28 /**
    31 /**
    29  * @category   Zend
    32  * @category   Zend
    30  * @package    Zend_Service_Amazon
    33  * @package    Zend_Service_Amazon
    31  * @subpackage Ec2
    34  * @subpackage Ec2
    32  * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
    35  * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
    33  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    36  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    34  */
    37  */
    35 class Zend_Service_Amazon_Ec2_Response {
    38 class Zend_Service_Amazon_Ec2_Response {
    36     /**
    39     /**
    37      * XML namespace used for EC2 responses.
    40      * XML namespace used for EC2 responses.
   123             if ($body !== false) {
   126             if ($body !== false) {
   124                 // turn off libxml error handling
   127                 // turn off libxml error handling
   125                 $errors = libxml_use_internal_errors();
   128                 $errors = libxml_use_internal_errors();
   126 
   129 
   127                 $this->_document = new DOMDocument();
   130                 $this->_document = new DOMDocument();
   128                 if (!$this->_document->loadXML($body)) {
   131                 $this->_document = Zend_Xml_Security::scan($body, $this->_document);
   129                     $this->_document = false;
       
   130                 }
       
   131 
   132 
   132                 // reset libxml error handling
   133                 // reset libxml error handling
   133                 libxml_clear_errors();
   134                 libxml_clear_errors();
   134                 libxml_use_internal_errors($errors);
   135                 libxml_use_internal_errors($errors);
   135             } else {
   136             } else {