Fix Pingback

This code was using the HTTPRequest helpers wrong.  This commit sets the body directly instead of jamming the XML in as a POST param.
This commit is contained in:
Stephen Paul Weber 2015-10-17 13:39:46 +00:00
parent d9d74ca96c
commit c7e08195e4

View File

@ -196,9 +196,10 @@ class LinkbackPlugin extends Plugin
$request = HTTPClient::start(); $request = HTTPClient::start();
try { try {
$request->setBody(xmlrpc_encode_request('pingback.ping', $args));
$response = $request->post($endpoint, $response = $request->post($endpoint,
array('Content-Type: text/xml'), array('Content-Type: text/xml'),
xmlrpc_encode_request('pingback.ping', $args)); false);
$response = xmlrpc_decode($response->getBody()); $response = xmlrpc_decode($response->getBody());
if (xmlrpc_is_fault($response)) { if (xmlrpc_is_fault($response)) {
common_log(LOG_WARNING, common_log(LOG_WARNING,