Edit report at http://pear.php.net/bugs/bug.php?id=18653&edit=1
ID: 18653
Updated by: [email protected]
Reported By: pwolanin at gmail dot com
Summary: error populating $r->hdrs
Status: Open
Type: Bug
Package: XML_RPC
Package Version: 1.5.4
PHP Version: 5.2.6
Roadmap Versions:
New Comment:
Looking at
http://svn.php.net/viewvc/pear/packages/XML_RPC2/trunk/XML/RPC2/Backend/Php/Client.php?revision=308706&view=markup&pathrev=311547
it would seem the response headers are totally discarded. So, I would
consider that a missing feature, since it doesn't seem to even be
attempted.
113 $httpRequest = new XML_RPC2_Util_HTTPRequest($uri,
$options);
114 $httpRequest->setPostData($request);
115 $httpRequest->sendRequest();
116 $body = $httpRequest->getBody();
Previous Comments:
------------------------------------------------------------------------
[2011-07-06 07:29:52] doconnor
Hi Peter, thanks for the patch.
Do you happen to know if XML_RPC2 suffers from the same problem?
------------------------------------------------------------------------
[2011-07-06 01:47:18] pwolanin
Added #patch bug:18653;patch:xmlrpc-hdrs;revision:1309913238;.
------------------------------------------------------------------------
[2011-07-06 01:45:24] pwolanin
Description:
------------
The response headers are being lost and not properly passed back to the
caller.
Test script:
---------------
<?php
require_once 'XML/RPC.php';
$message = new XML_RPC_Message('system.methodHelp',
array(XML_RPC_encode('system.listMethods')));
$client = new XML_RPC_Client("/xmlrpc.php", "http://drupal.org");
$response = $client->send($message, 2);
var_dump($response->hdrs);
Expected result:
----------------
header values, such as
array(16) {
[0]=>
string(15) "HTTP/1.1 200 OK"
[1]=>
string(29) "Server: Apache/2.2.3 (CentOS)"
[2]=>
string(24) "X-Powered-By: PHP/5.2.11"
Actual result:
--------------
array(1) {
[0]=>
string(1) "T"
}
Which is the 2nd char (index 1) of the 1st line of the headers.
------------------------------------------------------------------------
--
Edit this bug report at http://pear.php.net/bugs/bug.php?id=18653&edit=1
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.