- Patch #137138 by jvandyk: fixed problem with drupal_http_request() not setting the proper error code when a network effect occurs. Causes the XML-RPC backend to fail.
Backport from HEAD.5.x
parent
698ccae8cd
commit
565deb4f64
|
@ -429,6 +429,7 @@ function drupal_http_request($url, $headers = array(), $method = 'GET', $data =
|
|||
// Make sure the socket opened properly.
|
||||
if (!$fp) {
|
||||
$result->error = trim($errno .' '. $errstr);
|
||||
$result->code = -$errno;
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
|
|
@ -440,7 +440,7 @@ function _xmlrpc() {
|
|||
$xmlrpc_request = xmlrpc_request($method, $args);
|
||||
$result = drupal_http_request($url, array("Content-Type" => "text/xml"), 'POST', $xmlrpc_request->xml);
|
||||
if ($result->code != 200) {
|
||||
xmlrpc_error(-$result->code, $result->error);
|
||||
xmlrpc_error($result->code, $result->error);
|
||||
return FALSE;
|
||||
}
|
||||
$message = xmlrpc_message($result->data);
|
||||
|
|
Loading…
Reference in New Issue