ZF-1897: Leading/trailing newlines and spaces are preserved when loading XML from HTTP response.
When parsing a HTTP response with "Transfer-encoding: chunked" header Zend_Http_Response::getBody() tries to decode the body using Zend_Http_Response::decodeChunkedBody(). Unfortunately the decoded body is not trimmed as Zend_Http_Response::extractBody() already does for not chunked bodies. This results in a problem when using Zend_XmlRpc_Client because SimpleXML expects the XML declaration at the start of the document. I'd like to suggest to change Zend_Http_Response::decodeChunkedBody() as follows (i.e. simply adding a ltrim() call before returning the decoded body): see attachement.