diff -r 5b37998e522e -r 162c1de6545a web/lib/Zend/XmlRpc/Request/Http.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/lib/Zend/XmlRpc/Request/Http.php Fri Mar 11 15:05:35 2011 +0100 @@ -0,0 +1,124 @@ +_fault = new Zend_XmlRpc_Fault(630); + return; + } + + $this->_xml = $xml; + + $this->loadXml($xml); + } + + /** + * Retrieve the raw XML request + * + * @return string + */ + public function getRawRequest() + { + return $this->_xml; + } + + /** + * Get headers + * + * Gets all headers as key => value pairs and returns them. + * + * @return array + */ + public function getHeaders() + { + if (null === $this->_headers) { + $this->_headers = array(); + foreach ($_SERVER as $key => $value) { + if ('HTTP_' == substr($key, 0, 5)) { + $header = str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($key, 5))))); + $this->_headers[$header] = $value; + } + } + } + + return $this->_headers; + } + + /** + * Retrieve the full HTTP request, including headers and XML + * + * @return string + */ + public function getFullRequest() + { + $request = ''; + foreach ($this->getHeaders() as $key => $value) { + $request .= $key . ': ' . $value . "\n"; + } + + $request .= $this->_xml; + + return $request; + } +}