cvs: pear /XML_RPC RPC.php package.xml package2.xml

From: Date: Fri, 16 Jun 2006 16:00:54 +0000
Subject: cvs: pear /XML_RPC RPC.php package.xml package2.xml
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-40766@lists.php.net to get a copy of this message
danielc Fri Jun 16 16:00:54 2006 UTC Modified files: /pear/XML_RPC RPC.php package.xml package2.xml Log: * If PHP's mbstring extension is enabled, use mb_convert_encoding() to ensure the payload matches the intended encoding. http://cvs.php.net/viewcvs.cgi/pear/XML_RPC/RPC.php?r1=1.98&r2=1.99&diff_format=u Index: pear/XML_RPC/RPC.php diff -u pear/XML_RPC/RPC.php:1.98 pear/XML_RPC/RPC.php:1.99 --- pear/XML_RPC/RPC.php:1.98 Sun Jun 11 00:25:17 2006 +++ pear/XML_RPC/RPC.php Fri Jun 16 16:00:54 2006 @@ -32,7 +32,7 @@ * @author Martin Jansen <mj@php.net> * @author Daniel Convissor <danielc@php.net> * @copyright 1999-2001 Edd Dumbill, 2001-2006 The PHP Group - * @version CVS: $Id: RPC.php,v 1.98 2006/06/11 00:25:17 danielc Exp $ + * @version CVS: $Id: RPC.php,v 1.99 2006/06/16 16:00:54 danielc Exp $ * @link http://pear.php.net/package/XML_RPC */ @@ -222,7 +222,7 @@ /** * Should we automatically base64 encode strings that contain characters - * which cause PHP's SAX-based XML parser to break? + * which can cause PHP's SAX-based XML parser to break? * @global boolean $GLOBALS['XML_RPC_auto_base64'] */ $GLOBALS['XML_RPC_auto_base64'] = false; @@ -836,9 +836,12 @@ } /** - * Sets whether strings that contain characters which cause PHP's + * Sets whether strings that contain characters which may cause PHP's * SAX-based XML parser to break should be automatically base64 encoded * + * This is is a workaround for systems that don't have PHP's mbstring + * extension available. + * * @param int $in where 1 = on, 0 = off * * @return void @@ -1258,9 +1261,15 @@ * Part of the process makes sure all line endings are in DOS format * (CRLF), which is probably required by specifications. * + * If PHP's mbstring extension is enabled, the mb_convert_encoding() + * function is used to ensure the payload matches the encoding set in the + * XML declaration. The encoding type can be manually set via + * XML_RPC_Message::setSendEncoding(). + * * @return void * * @uses XML_RPC_Message::xml_header(), XML_RPC_Message::xml_footer() + * @see XML_RPC_Message::setSendEncoding(), $GLOBALS['XML_RPC_defencoding'] */ function createPayload() { @@ -1278,6 +1287,9 @@ } else { $this->payload = $GLOBALS['XML_RPC_func_ereg_replace']("\r\n|\n|\r|\n\r", "\r\n", $this->payload); } + if (function_exists('mb_convert_encoding')) { + $this->payload = mb_convert_encoding($this->payload, $this->send_encoding); + } } /** http://cvs.php.net/viewcvs.cgi/pear/XML_RPC/package.xml?r1=1.76&r2=1.77&diff_format=u Index: pear/XML_RPC/package.xml diff -u pear/XML_RPC/package.xml:1.76 pear/XML_RPC/package.xml:1.77 --- pear/XML_RPC/package.xml:1.76 Fri Jun 16 01:31:04 2006 +++ pear/XML_RPC/package.xml Fri Jun 16 16:00:54 2006 @@ -2,7 +2,7 @@ <!DOCTYPE package SYSTEM "http://pear.php.net/dtd/package-1.0"> <package version="1.0"> - <!-- $Id: package.xml,v 1.76 2006/06/16 01:31:04 danielc Exp $ --> + <!-- $Id: package.xml,v 1.77 2006/06/16 16:00:54 danielc Exp $ --> <name>XML_RPC</name> <summary>PHP implementation of the XML-RPC protocol</summary> @@ -33,8 +33,9 @@ <date>2006-06-16</date> <state>beta</state> <notes><![CDATA[ -* Provide complete multi-byte string support for systems with the mbstring extension enabled. -* Turn off the default of automatically base64 encoding strings that generate fatal errors in PHP's SAX parser. The automatic base64 encoding can be turned on via the new XML_RPC_Client::setAutoBase64() method. (The default encoding was added in the prior release, 1.4.8, and caused problems for users who don't control the receiving end of the requests.) +* Provide complete multi-byte string support for systems with the mbstring extension enabled. Bug 7837. +* If PHP's mbstring extension is enabled, use mb_convert_encoding() to ensure the payload matches the intended encoding. This is a better resolution of Bug 7376. +* Turn off the default of automatically base64 encoding strings that can generate fatal errors in PHP's SAX parser. The automatic base64 encoding can be turned on via the new XML_RPC_Client::setAutoBase64() method. The auto-encoding is a workaround for systems that don't have PHP's mbstring extension available. (The automatic base64 encoding was added in the prior release, 1.4.8, and caused problems for users who don't control the receiving end of the requests.) Bug 7837. ]]></notes> <filelist> http://cvs.php.net/viewcvs.cgi/pear/XML_RPC/package2.xml?r1=1.40&r2=1.41&diff_format=u Index: pear/XML_RPC/package2.xml diff -u pear/XML_RPC/package2.xml:1.40 pear/XML_RPC/package2.xml:1.41 --- pear/XML_RPC/package2.xml:1.40 Fri Jun 16 01:31:04 2006 +++ pear/XML_RPC/package2.xml Fri Jun 16 16:00:54 2006 @@ -8,7 +8,7 @@ http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd"> - <!-- $Id: package2.xml,v 1.40 2006/06/16 01:31:04 danielc Exp $ --> + <!-- $Id: package2.xml,v 1.41 2006/06/16 16:00:54 danielc Exp $ --> <name>XML_RPC</name> <channel>pear.php.net</channel> @@ -45,8 +45,9 @@ <license uri="http://www.php.net/license/3_01.txt">PHP License</license> <notes><![CDATA[ -* Provide complete multi-byte string support for systems with the mbstring extension enabled. -* Turn off the default of automatically base64 encoding strings that generate fatal errors in PHP's SAX parser. The automatic base64 encoding can be turned on via the new XML_RPC_Client::setAutoBase64() method. (The default encoding was added in the prior release, 1.4.8, and caused problems for users who don't control the receiving end of the requests.) +* Provide complete multi-byte string support for systems with the mbstring extension enabled. Bug 7837. +* If PHP's mbstring extension is enabled, use mb_convert_encoding() to ensure the payload matches the intended encoding. This is a better resolution of Bug 7376. +* Turn off the default of automatically base64 encoding strings that can generate fatal errors in PHP's SAX parser. The automatic base64 encoding can be turned on via the new XML_RPC_Client::setAutoBase64() method. The auto-encoding is a workaround for systems that don't have PHP's mbstring extension available. (The automatic base64 encoding was added in the prior release, 1.4.8, and caused problems for users who don't control the receiving end of the requests.) Bug 7837. ]]></notes> <contents>

« previous php.pear.cvs (#40766) next »