cvs: pear /XML_RPC RPC.php Server.php package.xml package2.xml
| From: | Daniel Convissor | Date: | Fri, 11 Mar 2005 22:07:39 +0000 |
| Subject: | cvs: pear /XML_RPC RPC.php Server.php package.xml package2.xml | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-30222@lists.php.net to get a copy of this message | ||
danielc Fri Mar 11 17:07:39 2005 EDT
Modified files:
/pear/XML_RPC RPC.php Server.php package.xml package2.xml
Log:
*
http://cvs.php.net/diff.php/pear/XML_RPC/RPC.php?r1=1.60&r2=1.61&ty=u Index: pear/XML_RPC/RPC.php diff -u pear/XML_RPC/RPC.php:1.60 pear/XML_RPC/RPC.php:1.61 --- pear/XML_RPC/RPC.php:1.60 Mon Mar 7 12:45:08 2005 +++ pear/XML_RPC/RPC.php Fri Mar 11 17:07:38 2005 @@ -32,7 +32,7 @@ * @author Martin Jansen <mj@php.net> * @author Daniel Convissor <danielc@php.net> * @copyright 1999-2001 Edd Dumbill - * @version CVS: $Id: RPC.php,v 1.60 2005/03/07 17:45:08 danielc Exp $ + * @version CVS: $Id: RPC.php,v 1.61 2005/03/11 22:07:38 danielc Exp $ * @link http://pear.php.net/package/XML_RPC */ @@ -203,9 +203,10 @@ * * @return void */ -function XML_RPC_se($parser, $name, $attrs) +function XML_RPC_se($parser_resource, $name, $attrs) { global $XML_RPC_xh, $XML_RPC_DateTime, $XML_RPC_String; + $parser = (int) $parser_resource; switch ($name) { case 'STRUCT': @@ -282,9 +283,10 @@ * * @return void */ -function XML_RPC_ee($parser, $name) +function XML_RPC_ee($parser_resource, $name) { global $XML_RPC_xh, $XML_RPC_Types, $XML_RPC_String; + $parser = (int) $parser_resource; switch ($name) { case 'STRUCT': @@ -409,9 +411,10 @@ * * @return void */ -function XML_RPC_cd($parser, $data) +function XML_RPC_cd($parser_resource, $data) { global $XML_RPC_xh, $XML_RPC_backslash; + $parser = (int) $parser_resource; if ($XML_RPC_xh[$parser]['lv'] != 3) { // "lookforvalue==3" means that we've found an entire value @@ -1166,7 +1169,8 @@ global $XML_RPC_xh, $XML_RPC_err, $XML_RPC_str, $XML_RPC_defencoding; $encoding = $this->getEncoding($data); - $parser = xml_parser_create($encoding); + $parser_resource = xml_parser_create($encoding); + $parser = (int) $parser_resource; $XML_RPC_xh[$parser] = array(); @@ -1176,9 +1180,9 @@ $XML_RPC_xh[$parser]['ac'] = ''; $XML_RPC_xh[$parser]['qt'] = ''; - xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, true); - xml_set_element_handler($parser, 'XML_RPC_se', 'XML_RPC_ee'); - xml_set_character_data_handler($parser, 'XML_RPC_cd'); + xml_parser_set_option($parser_resource, XML_OPTION_CASE_FOLDING, true); + xml_set_element_handler($parser_resource, 'XML_RPC_se', 'XML_RPC_ee'); + xml_set_character_data_handler($parser_resource, 'XML_RPC_cd'); $hdrfnd = 0; if ($this->debug) { @@ -1196,7 +1200,7 @@ $r = new XML_RPC_Response(0, $XML_RPC_err['http_error'], $XML_RPC_str['http_error'] . ' (' . $errstr . ')'); - xml_parser_free($parser); + xml_parser_free($parser_resource); return $r; } // gotta get rid of headers here @@ -1215,22 +1219,22 @@ */ $data = substr($data, 0, strpos($data, "</methodResponse>") + 17); - if (!xml_parse($parser, $data, sizeof($data))) { + if (!xml_parse($parser_resource, $data, sizeof($data))) { // thanks to Peter Kocks <peter.kocks@baygate.com> - if ((xml_get_current_line_number($parser)) == 1) { + if ((xml_get_current_line_number($parser_resource)) == 1) { $errstr = 'XML error at line 1, check URL'; } else { $errstr = sprintf('XML error: %s at line %d', - xml_error_string(xml_get_error_code($parser)), - xml_get_current_line_number($parser)); + xml_error_string(xml_get_error_code($parser_resource)), + xml_get_current_line_number($parser_resource)); } error_log($errstr); $r = new XML_RPC_Response(0, $XML_RPC_err['invalid_return'], $XML_RPC_str['invalid_return']); - xml_parser_free($parser); + xml_parser_free($parser_resource); return $r; } - xml_parser_free($parser); + xml_parser_free($parser_resource); if ($this->debug) { print '<PRE>---EVALING---[' . strlen($XML_RPC_xh[$parser]['st']) . " chars]---\n" . http://cvs.php.net/diff.php/pear/XML_RPC/Server.php?r1=1.17&r2=1.18&ty=u Index: pear/XML_RPC/Server.php diff -u pear/XML_RPC/Server.php:1.17 pear/XML_RPC/Server.php:1.18 --- pear/XML_RPC/Server.php:1.17 Tue Mar 1 12:09:49 2005 +++ pear/XML_RPC/Server.php Fri Mar 11 17:07:38 2005 @@ -31,7 +31,7 @@ * @author Stig Bakken <stig@php.net> * @author Martin Jansen <mj@php.net> * @copyright 1999-2001 Edd Dumbill - * @version CVS: $Id: Server.php,v 1.17 2005/03/01 17:09:49 danielc Exp $ + * @version CVS: $Id: Server.php,v 1.18 2005/03/11 22:07:38 danielc Exp $ * @link http://pear.php.net/package/XML_RPC */ @@ -366,7 +366,8 @@ } $this->encoding = XML_RPC_Message::getEncoding($data); - $parser = xml_parser_create($this->encoding); + $parser_resource = xml_parser_create($this->encoding); + $parser = (int) $parser_resource; $XML_RPC_xh[$parser] = array(); $XML_RPC_xh[$parser]['st'] = ''; @@ -379,19 +380,19 @@ // decompose incoming XML into request structure - xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, true); - xml_set_element_handler($parser, 'XML_RPC_se', 'XML_RPC_ee'); - xml_set_character_data_handler($parser, 'XML_RPC_cd'); - if (!xml_parse($parser, $data, 1)) { + xml_parser_set_option($parser_resource, XML_OPTION_CASE_FOLDING, true); + xml_set_element_handler($parser_resource, 'XML_RPC_se', 'XML_RPC_ee'); + xml_set_character_data_handler($parser_resource, 'XML_RPC_cd'); + if (!xml_parse($parser_resource, $data, 1)) { // return XML error as a faultCode $r = new XML_RPC_Response(0, - $XML_RPC_errxml+xml_get_error_code($parser), + $XML_RPC_errxml+xml_get_error_code($parser_resource), sprintf('XML error: %s at line %d', - xml_error_string(xml_get_error_code($parser)), - xml_get_current_line_number($parser))); - xml_parser_free($parser); + xml_error_string(xml_get_error_code($parser_resource)), + xml_get_current_line_number($parser_resource))); + xml_parser_free($parser_resource); } else { - xml_parser_free($parser); + xml_parser_free($parser_resource); $m = new XML_RPC_Message($XML_RPC_xh[$parser]['method']); // now add parameters in for ($i = 0; $i < sizeof($XML_RPC_xh[$parser]['params']); $i++) { http://cvs.php.net/diff.php/pear/XML_RPC/package.xml?r1=1.42&r2=1.43&ty=u Index: pear/XML_RPC/package.xml diff -u pear/XML_RPC/package.xml:1.42 pear/XML_RPC/package.xml:1.43 --- pear/XML_RPC/package.xml:1.42 Mon Mar 7 12:45:08 2005 +++ pear/XML_RPC/package.xml Fri Mar 11 17:07:38 2005 @@ -2,7 +2,7 @@ <!DOCTYPE package SYSTEM "http://pear.php.net/dtd/package-1.0"> <package version="1.0"> - <!-- $Id: package.xml,v 1.42 2005/03/07 17:45:08 danielc Exp $ --> + <!-- $Id: package.xml,v 1.43 2005/03/11 22:07:38 danielc Exp $ --> <name>XML_RPC</name> <summary>PHP implementation of the XML-RPC protocol</summary> @@ -30,8 +30,8 @@ <release> - <version>1.2.2</version> - <date>2005-03-07</date> + <version>1.2.3</version> + <date>pending</date> <state>stable</state> <notes><![CDATA[ * When using a proxy, add the protocol to the Request-URI, making it an "absoluteURI" as per the HTTP 1.0 spec. Bug 3679. @@ -60,6 +60,15 @@ <changelog> <release> + <version>1.2.2</version> + <date>2005-03-07</date> + <state>stable</state> + <notes><![CDATA[ +* When using a proxy, add the protocol to the Request-URI, making it an "absoluteURI" as per the HTTP 1.0 spec. Bug 3679. + ]]></notes> + </release> + + <release> <version>1.2.1</version> <date>2005-03-01</date> <state>stable</state> http://cvs.php.net/diff.php/pear/XML_RPC/package2.xml?r1=1.4&r2=1.5&ty=u Index: pear/XML_RPC/package2.xml diff -u pear/XML_RPC/package2.xml:1.4 pear/XML_RPC/package2.xml:1.5 --- pear/XML_RPC/package2.xml:1.4 Mon Mar 7 12:52:26 2005 +++ pear/XML_RPC/package2.xml Fri Mar 11 17:07:39 2005 @@ -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.4 2005/03/07 17:52:26 danielc Exp $ --> + <!-- $Id: package2.xml,v 1.5 2005/03/11 22:07:39 danielc Exp $ --> <name>XML_RPC</name> <channel>pear.php.net</channel> @@ -32,10 +32,10 @@ <active>yes</active> </lead> - <date>2005-03-07</date> + <date>pending</date> <version> - <release>1.2.2</release> + <release>1.2.3</release> <api>1.2.0</api> </version> <stability> @@ -45,7 +45,7 @@ <license uri="http://www.php.net/license/3_0.txt">PHP License</license> <notes><![CDATA[ -* When using a proxy, add the protocol to the Request-URI, making it an "absoluteURI" as per the HTTP 1.0 spec. Bug 3679. +* Convert the parser handle to an integer before using it as an index for $XML_RPC_xh[$parser]. Reduces E_STRICT notices. Bug 3782. ]]></notes> <contents> @@ -103,6 +103,22 @@ <release> <version> + <release>1.2.2</release> + <api>1.2.0</api> + </version> + <stability> + <release>stable</release> + <api>stable</api> + </stability> + <date>2005-03-07</date> + <license uri="http://www.php.net/license/3_0.txt">PHP License</license> + <notes><![CDATA[ +* When using a proxy, add the protocol to the Request-URI, making it an "absoluteURI" as per the HTTP 1.0 spec. Bug 3679. + ]]></notes> + </release> + + <release> + <version> <release>1.2.1</release> <api>1.2.0</api> </version>
http://cvs.php.net/diff.php/pear/XML_RPC/RPC.php?r1=1.60&r2=1.61&ty=u Index: pear/XML_RPC/RPC.php diff -u pear/XML_RPC/RPC.php:1.60 pear/XML_RPC/RPC.php:1.61 --- pear/XML_RPC/RPC.php:1.60 Mon Mar 7 12:45:08 2005 +++ pear/XML_RPC/RPC.php Fri Mar 11 17:07:38 2005 @@ -32,7 +32,7 @@ * @author Martin Jansen <mj@php.net> * @author Daniel Convissor <danielc@php.net> * @copyright 1999-2001 Edd Dumbill - * @version CVS: $Id: RPC.php,v 1.60 2005/03/07 17:45:08 danielc Exp $ + * @version CVS: $Id: RPC.php,v 1.61 2005/03/11 22:07:38 danielc Exp $ * @link http://pear.php.net/package/XML_RPC */ @@ -203,9 +203,10 @@ * * @return void */ -function XML_RPC_se($parser, $name, $attrs) +function XML_RPC_se($parser_resource, $name, $attrs) { global $XML_RPC_xh, $XML_RPC_DateTime, $XML_RPC_String; + $parser = (int) $parser_resource; switch ($name) { case 'STRUCT': @@ -282,9 +283,10 @@ * * @return void */ -function XML_RPC_ee($parser, $name) +function XML_RPC_ee($parser_resource, $name) { global $XML_RPC_xh, $XML_RPC_Types, $XML_RPC_String; + $parser = (int) $parser_resource; switch ($name) { case 'STRUCT': @@ -409,9 +411,10 @@ * * @return void */ -function XML_RPC_cd($parser, $data) +function XML_RPC_cd($parser_resource, $data) { global $XML_RPC_xh, $XML_RPC_backslash; + $parser = (int) $parser_resource; if ($XML_RPC_xh[$parser]['lv'] != 3) { // "lookforvalue==3" means that we've found an entire value @@ -1166,7 +1169,8 @@ global $XML_RPC_xh, $XML_RPC_err, $XML_RPC_str, $XML_RPC_defencoding; $encoding = $this->getEncoding($data); - $parser = xml_parser_create($encoding); + $parser_resource = xml_parser_create($encoding); + $parser = (int) $parser_resource; $XML_RPC_xh[$parser] = array(); @@ -1176,9 +1180,9 @@ $XML_RPC_xh[$parser]['ac'] = ''; $XML_RPC_xh[$parser]['qt'] = ''; - xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, true); - xml_set_element_handler($parser, 'XML_RPC_se', 'XML_RPC_ee'); - xml_set_character_data_handler($parser, 'XML_RPC_cd'); + xml_parser_set_option($parser_resource, XML_OPTION_CASE_FOLDING, true); + xml_set_element_handler($parser_resource, 'XML_RPC_se', 'XML_RPC_ee'); + xml_set_character_data_handler($parser_resource, 'XML_RPC_cd'); $hdrfnd = 0; if ($this->debug) { @@ -1196,7 +1200,7 @@ $r = new XML_RPC_Response(0, $XML_RPC_err['http_error'], $XML_RPC_str['http_error'] . ' (' . $errstr . ')'); - xml_parser_free($parser); + xml_parser_free($parser_resource); return $r; } // gotta get rid of headers here @@ -1215,22 +1219,22 @@ */ $data = substr($data, 0, strpos($data, "</methodResponse>") + 17); - if (!xml_parse($parser, $data, sizeof($data))) { + if (!xml_parse($parser_resource, $data, sizeof($data))) { // thanks to Peter Kocks <peter.kocks@baygate.com> - if ((xml_get_current_line_number($parser)) == 1) { + if ((xml_get_current_line_number($parser_resource)) == 1) { $errstr = 'XML error at line 1, check URL'; } else { $errstr = sprintf('XML error: %s at line %d', - xml_error_string(xml_get_error_code($parser)), - xml_get_current_line_number($parser)); + xml_error_string(xml_get_error_code($parser_resource)), + xml_get_current_line_number($parser_resource)); } error_log($errstr); $r = new XML_RPC_Response(0, $XML_RPC_err['invalid_return'], $XML_RPC_str['invalid_return']); - xml_parser_free($parser); + xml_parser_free($parser_resource); return $r; } - xml_parser_free($parser); + xml_parser_free($parser_resource); if ($this->debug) { print '<PRE>---EVALING---[' . strlen($XML_RPC_xh[$parser]['st']) . " chars]---\n" . http://cvs.php.net/diff.php/pear/XML_RPC/Server.php?r1=1.17&r2=1.18&ty=u Index: pear/XML_RPC/Server.php diff -u pear/XML_RPC/Server.php:1.17 pear/XML_RPC/Server.php:1.18 --- pear/XML_RPC/Server.php:1.17 Tue Mar 1 12:09:49 2005 +++ pear/XML_RPC/Server.php Fri Mar 11 17:07:38 2005 @@ -31,7 +31,7 @@ * @author Stig Bakken <stig@php.net> * @author Martin Jansen <mj@php.net> * @copyright 1999-2001 Edd Dumbill - * @version CVS: $Id: Server.php,v 1.17 2005/03/01 17:09:49 danielc Exp $ + * @version CVS: $Id: Server.php,v 1.18 2005/03/11 22:07:38 danielc Exp $ * @link http://pear.php.net/package/XML_RPC */ @@ -366,7 +366,8 @@ } $this->encoding = XML_RPC_Message::getEncoding($data); - $parser = xml_parser_create($this->encoding); + $parser_resource = xml_parser_create($this->encoding); + $parser = (int) $parser_resource; $XML_RPC_xh[$parser] = array(); $XML_RPC_xh[$parser]['st'] = ''; @@ -379,19 +380,19 @@ // decompose incoming XML into request structure - xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, true); - xml_set_element_handler($parser, 'XML_RPC_se', 'XML_RPC_ee'); - xml_set_character_data_handler($parser, 'XML_RPC_cd'); - if (!xml_parse($parser, $data, 1)) { + xml_parser_set_option($parser_resource, XML_OPTION_CASE_FOLDING, true); + xml_set_element_handler($parser_resource, 'XML_RPC_se', 'XML_RPC_ee'); + xml_set_character_data_handler($parser_resource, 'XML_RPC_cd'); + if (!xml_parse($parser_resource, $data, 1)) { // return XML error as a faultCode $r = new XML_RPC_Response(0, - $XML_RPC_errxml+xml_get_error_code($parser), + $XML_RPC_errxml+xml_get_error_code($parser_resource), sprintf('XML error: %s at line %d', - xml_error_string(xml_get_error_code($parser)), - xml_get_current_line_number($parser))); - xml_parser_free($parser); + xml_error_string(xml_get_error_code($parser_resource)), + xml_get_current_line_number($parser_resource))); + xml_parser_free($parser_resource); } else { - xml_parser_free($parser); + xml_parser_free($parser_resource); $m = new XML_RPC_Message($XML_RPC_xh[$parser]['method']); // now add parameters in for ($i = 0; $i < sizeof($XML_RPC_xh[$parser]['params']); $i++) { http://cvs.php.net/diff.php/pear/XML_RPC/package.xml?r1=1.42&r2=1.43&ty=u Index: pear/XML_RPC/package.xml diff -u pear/XML_RPC/package.xml:1.42 pear/XML_RPC/package.xml:1.43 --- pear/XML_RPC/package.xml:1.42 Mon Mar 7 12:45:08 2005 +++ pear/XML_RPC/package.xml Fri Mar 11 17:07:38 2005 @@ -2,7 +2,7 @@ <!DOCTYPE package SYSTEM "http://pear.php.net/dtd/package-1.0"> <package version="1.0"> - <!-- $Id: package.xml,v 1.42 2005/03/07 17:45:08 danielc Exp $ --> + <!-- $Id: package.xml,v 1.43 2005/03/11 22:07:38 danielc Exp $ --> <name>XML_RPC</name> <summary>PHP implementation of the XML-RPC protocol</summary> @@ -30,8 +30,8 @@ <release> - <version>1.2.2</version> - <date>2005-03-07</date> + <version>1.2.3</version> + <date>pending</date> <state>stable</state> <notes><![CDATA[ * When using a proxy, add the protocol to the Request-URI, making it an "absoluteURI" as per the HTTP 1.0 spec. Bug 3679. @@ -60,6 +60,15 @@ <changelog> <release> + <version>1.2.2</version> + <date>2005-03-07</date> + <state>stable</state> + <notes><![CDATA[ +* When using a proxy, add the protocol to the Request-URI, making it an "absoluteURI" as per the HTTP 1.0 spec. Bug 3679. + ]]></notes> + </release> + + <release> <version>1.2.1</version> <date>2005-03-01</date> <state>stable</state> http://cvs.php.net/diff.php/pear/XML_RPC/package2.xml?r1=1.4&r2=1.5&ty=u Index: pear/XML_RPC/package2.xml diff -u pear/XML_RPC/package2.xml:1.4 pear/XML_RPC/package2.xml:1.5 --- pear/XML_RPC/package2.xml:1.4 Mon Mar 7 12:52:26 2005 +++ pear/XML_RPC/package2.xml Fri Mar 11 17:07:39 2005 @@ -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.4 2005/03/07 17:52:26 danielc Exp $ --> + <!-- $Id: package2.xml,v 1.5 2005/03/11 22:07:39 danielc Exp $ --> <name>XML_RPC</name> <channel>pear.php.net</channel> @@ -32,10 +32,10 @@ <active>yes</active> </lead> - <date>2005-03-07</date> + <date>pending</date> <version> - <release>1.2.2</release> + <release>1.2.3</release> <api>1.2.0</api> </version> <stability> @@ -45,7 +45,7 @@ <license uri="http://www.php.net/license/3_0.txt">PHP License</license> <notes><![CDATA[ -* When using a proxy, add the protocol to the Request-URI, making it an "absoluteURI" as per the HTTP 1.0 spec. Bug 3679. +* Convert the parser handle to an integer before using it as an index for $XML_RPC_xh[$parser]. Reduces E_STRICT notices. Bug 3782. ]]></notes> <contents> @@ -103,6 +103,22 @@ <release> <version> + <release>1.2.2</release> + <api>1.2.0</api> + </version> + <stability> + <release>stable</release> + <api>stable</api> + </stability> + <date>2005-03-07</date> + <license uri="http://www.php.net/license/3_0.txt">PHP License</license> + <notes><![CDATA[ +* When using a proxy, add the protocol to the Request-URI, making it an "absoluteURI" as per the HTTP 1.0 spec. Bug 3679. + ]]></notes> + </release> + + <release> + <version> <release>1.2.1</release> <api>1.2.0</api> </version>