diff --git includes/common.inc includes/common.inc
index 37a0504..7dcd559 100644
--- includes/common.inc
+++ includes/common.inc
@@ -6751,12 +6751,16 @@ function entity_form_submit_build_entity($entity_type, $entity, $form, &$form_st
  *   An absolute URL of the XML-RPC endpoint.
  *     Example:
  *     http://www.example.com/xmlrpc.php
- * @param ...
+ * @param $args
+ *   An array of arguments.
  *   For one request:
  *     The method name followed by a variable number of arguments to the method.
  *   For multiple requests (system.multicall):
  *     An array of call arrays. Each call array follows the pattern of the single
  *     request: method name followed by the arguments to the method.
+ * @param $options
+ *   Optional array of options for drupal_http_request().
+ *
  * @return
  *   For one request:
  *     Either the return value of the method on success, or FALSE.
@@ -6766,10 +6770,9 @@ function entity_form_submit_build_entity($entity_type, $entity, $form, &$form_st
  *     returned by the method called, or an xmlrpc_error object if the call
  *     failed. See xmlrpc_error().
  */
-function xmlrpc($url) {
+function xmlrpc($url, $args, $options = array()) {
   require_once DRUPAL_ROOT . '/includes/xmlrpc.inc';
-  $args = func_get_args();
-  return call_user_func_array('_xmlrpc', $args);
+  return _xmlrpc($url, $args, $options);
 }
 
 /**
diff --git includes/xmlrpc.inc includes/xmlrpc.inc
index 20c2aab..12e1aab 100644
--- includes/xmlrpc.inc
+++ includes/xmlrpc.inc
@@ -530,12 +530,15 @@ function xmlrpc_base64_get_xml($xmlrpc_base64) {
  * @param $url
  *   The absolute URL of the XML-RPC endpoint. Example:
  *   http://www.example.com/xmlrpc.php
- * @param ...
+ * @param $args
+ *   Array of arguments.
  *   - For one request: The method name followed by a variable number of
  *     arguments to the method.
  *   - For multiple requests (system.multicall): An array of call arrays. Each
  *     call array follows the pattern of the single request: method name
  *     followed by the arguments to the method.
+ * @param $options
+ *   Array of options for drupal_http_request().
  *
  * @return
  *   A single response (single request) or an array of responses (multicall
@@ -544,9 +547,7 @@ function xmlrpc_base64_get_xml($xmlrpc_base64) {
  *   is returned, see xmlrpc_errno() and xmlrpc_error_msg() to get more
  *   information.
  */
-function _xmlrpc() {
-  $args = func_get_args();
-  $url = array_shift($args);
+function _xmlrpc($url, $args, $options) {
   xmlrpc_clear_error();
   if (is_array($args[0])) {
     $method = 'system.multicall';
@@ -560,11 +561,10 @@ function _xmlrpc() {
     $method = array_shift($args);
   }
   $xmlrpc_request = xmlrpc_request($method, $args);
-  $options = array(
-    'headers' => array('Content-Type' => 'text/xml'),
-    'method' => 'POST',
-    'data' => $xmlrpc_request->xml,
-  );
+  // Required options which will replace any that are passed in.
+  $options['method'] = 'POST';
+  $options['headers']['Content-Type'] = 'text/xml';
+  $options['data'] = $xmlrpc_request->xml;
   $result = drupal_http_request($url, $options);
   if ($result->code != 200) {
     xmlrpc_error($result->code, $result->error);
