diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2006-01-18 23:08:39 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2006-01-18 23:08:39 +0000 |
commit | b755666f89d68f4a8f5eb1cd4a90a2a463d90583 (patch) | |
tree | 48ae63d78e0e24e860b4787337731790080d3cb3 /etc/inc/xmlrpc_server.inc | |
parent | ff074bf9484800509afeb99ee23005166bfd7200 (diff) | |
download | pfsense-b755666f89d68f4a8f5eb1cd4a90a2a463d90583.zip pfsense-b755666f89d68f4a8f5eb1cd4a90a2a463d90583.tar.gz |
MFC 9496
Update the XML_RPC client package to 1.4.5, released on 01/14/06. This fixes a header() issue with PHP 4.4.2.
Diffstat (limited to 'etc/inc/xmlrpc_server.inc')
-rw-r--r-- | etc/inc/xmlrpc_server.inc | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/etc/inc/xmlrpc_server.inc b/etc/inc/xmlrpc_server.inc index cefa15b..3cdce84 100644 --- a/etc/inc/xmlrpc_server.inc +++ b/etc/inc/xmlrpc_server.inc @@ -270,7 +270,7 @@ function XML_RPC_Server_debugmsg($m) * @author Martin Jansen <mj@php.net> * @author Daniel Convissor <danielc@php.net> * @copyright 1999-2001 Edd Dumbill, 2001-2005 The PHP Group - * @version Release: 1.4.2 + * @version Release: 1.4.5 * @link http://pear.php.net/package/XML_RPC */ class XML_RPC_Server @@ -391,7 +391,23 @@ class XML_RPC_Server if (!$this->server_headers) { $this->createServerHeaders(); } - header($this->server_headers); + + /* + * $server_headers needs to remain a string for compatibility with + * old scripts using this package, but PHP 4.4.2 no longer allows + * line breaks in header() calls. So, we split each header into + * an individual call. The initial replace handles the off chance + * that someone composed a single header with multiple lines, which + * the RFCs allow. + */ + $this->server_headers = preg_replace("/[\r\n]+[ \t]+/", ' ', + trim($this->server_headers)); + $headers = preg_split("/[\r\n]+/", $this->server_headers); + foreach ($headers as $header) + { + header($header); + } + print $this->server_payload; } @@ -624,4 +640,4 @@ class XML_RPC_Server * End: */ -?>
\ No newline at end of file +?> |