Index: XmlRpc/Client.php =================================================================== --- XmlRpc/Client.php (revision 12984) +++ XmlRpc/Client.php (working copy) @@ -119,6 +119,12 @@ protected $_lastResponse = null; /** + * The user-agent sent with the request + * @var string + */ + protected $_userAgent = 'Zend_XmlRpc_Client'; + + /** * Proxy object for more convenient method calls * @var array of Zend_XmlRpc_Client_ServerProxy */ @@ -235,6 +241,28 @@ } /** + * Set the user-agent to be used for the request + * + * @param string $userAgent + * @return Zend_XmlRpc_Client + */ + public function setUserAgent($userAgent) + { + $this->_userAgent = (string) $userAgent; + return $this; + } + + /** + * The currently set user agent string + * + * @return string + */ + public function getUserAgent() + { + return $this->_userAgent; + } + + /** * Set skip system lookup flag * * @param bool $flag @@ -278,7 +306,7 @@ $http->setHeaders(array( 'Content-Type: text/xml; charset=utf-8', - 'User-Agent: Zend_XmlRpc_Client', + 'User-Agent: ' . $this->getUserAgent(), 'Accept: text/xml', ));