From 5bec95fe331a9e7afceff701458e2998ab299b3e Mon Sep 17 00:00:00 2001
From: ggiunta <ggiunta@013ecfd8-0664-425d-a759-9c98391dc3f9>
Date: Mon, 12 Apr 2010 17:55:09 +0000
Subject: [PATCH] - method setAcceptedCompression was failing to disable
 reception of compressed responses if the client supported them (triggering a
 bug with https and php < 5.3 on windows due); - remove a php warning that
 could be generated when using debug=2 in a client connecting to an https
 server

git-svn-id: https://svn.code.sf.net/p/phpxmlrpc/code/trunk/xmlrpc@73 013ecfd8-0664-425d-a759-9c98391dc3f9
---
 ChangeLog      | 17 +++++++++++++++++
 lib/xmlrpc.inc | 20 ++++++++++++++++++--
 2 files changed, 35 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 96cc5497..c277284a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+2010-04-12 - G. Giunta (giunta.gaetano@gmail.com)
+
+	* testsuite.php, parse_args.php: testsuite allows interrogating https servers ignoring their certs
+	* xmlrpc.inc: method setAcceptedCompression was failing to disable reception
+	of compressed responses if the client supported them (triggering a bug with
+	https and php < 5.3 on windows due); remove a php warning that could be
+	generated when using debug=2 in a client connecting to an https
+	server
+
+2010-04-11 - G. Giunta (giunta.gaetano@gmail.com) thanks amoe
+
+	* fixed: bad variables in "make install" make target
+
+2009-11-11 - G. Giunta (giunta.gaetano@gmail.com) thanks Ikiro Watanabe
+
+	* added INSTALL file
+
 2009-09-05 - G. Giunta (giunta.gaetano@gmail.com)
 
 	* xmlrpcs.inc, xmlrpcs.inc: remove code that was left for compatibility
diff --git a/lib/xmlrpc.inc b/lib/xmlrpc.inc
index 5269633e..ad414140 100644
--- a/lib/xmlrpc.inc
+++ b/lib/xmlrpc.inc
@@ -707,6 +707,7 @@
 					$GLOBALS['_xh']['value'] = $curr_val['values'];
 					$GLOBALS['_xh']['vt']=strtolower($name);
 					if (isset($curr_val['php_class']))
+
 					{
 						$GLOBALS['_xh']['php_class'] = $curr_val['php_class'];
 					}
@@ -988,6 +989,7 @@
 		function setCaCertificate($cacert, $is_dir=false)
 		{
 			if ($is_dir)
+
 			{
 				$this->cacertdir = $cacert;
 			}
@@ -1062,7 +1064,10 @@
 			if ($compmethod == 'any')
 				$this->accepted_compression = array('gzip', 'deflate');
 			else
-				$this->accepted_compression = array($compmethod);
+			    if ($compmethod == false )
+			        $this->accepted_compression = array();
+    		    else
+    				$this->accepted_compression = array($compmethod);
 		}
 
 		/**
@@ -1159,6 +1164,7 @@
 			$msg->debug=$this->debug;
 
 			if($method == 'https')
+
 			{
 				$r =& $this->sendPayloadHTTPS(
 					$msg,
@@ -1667,7 +1673,14 @@
 			{
 				print "<PRE>\n---CURL INFO---\n";
 				foreach(curl_getinfo($curl) as $name => $val)
-					 print $name . ': ' . htmlentities($val). "\n";
+				{
+					if (is_array($val))
+					{
+						$val = implode("\n", $val);
+					}
+					print $name . ': ' . htmlentities($val) . "\n";
+				}
+
 				print "---END---\n</PRE>";
 			}
 
@@ -1847,6 +1860,7 @@
 						case 1:
 							if(!isset($val[0]))
 							{
+
 								return false;		// Bad value
 							}
 							// Normal return value
@@ -3499,6 +3513,7 @@ xmlrpc_encode_entitites($this->errstr, $GLOBALS['xmlrpc_internalencoding'], $cha
 					$xmlrpc_val = new xmlrpcval((int)$php_val, $GLOBALS['xmlrpcInt']);
 				}
 				else
+
 				{
 					$xmlrpc_val = new xmlrpcval();
 				}
@@ -3700,6 +3715,7 @@ xmlrpc_encode_entitites($this->errstr, $GLOBALS['xmlrpc_internalencoding'], $cha
 		}
 		elseif(preg_match('/^(\xEF\xBB\xBF)/', $xmlchunk))
 		{
+
 			return 'UTF-8';
 		}
 
-- 
2.47.0