Changelog 61 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573
  1. 2009-09-05 - G. Giunta (giunta.gaetano@gmail.com)
  2. * xmlrpcs.inc, xmlrpcs.inc: remove code that was left for compatibility
  3. with php 4; use __METHOD__ constant for error messages instead of hardcoded
  4. values
  5. * xmlrpcs.inc: catch exceptions thrown during execution of invoked methods;
  6. check for $_SERVER having been disabled via php.ini and log an error if so
  7. * server.php, testsuite.php: add a new test and server method for exception
  8. catching in the server
  9. * xmlrpc.inc: added new method SetUserAgent to client to allow having different
  10. user-agent http headers
  11. * tagged and released as 3.0.0 beta
  12. 2009-08-05 - G. Giunta (giunta.gaetano@gmail.com)
  13. * xmlrpc_wrappers.inc: improve compatibility with php 5.0 when registering
  14. class/object methods
  15. 2009-08-02 - G. Giunta (giunta.gaetano@gmail.com) thanks Laurens
  16. * xmlrpcs.inc: add a new member var in server class to allow fine-tuning
  17. of the encoding of returned values when the server is in 'phpvals' mode;
  18. allow servers in 'xmlrpcvals' mode to also register plain php functions by
  19. defining them in the dispatch map with an added option:
  20. 'parameters_type' => 'phpvals' (feature request #2806628)
  21. * xmlrpc.inc: added new method xmrlpc_client::SetCurlOptions($array) to
  22. allow extra flexibility in tweaking http config, such as explicitly
  23. binding to an ip address (feature request #2787468); fix bad encoding if
  24. same object is encoded twice using php_xmlrpc_encode; removed some by-ref
  25. assignments and declarations
  26. 2009-07-31 - G. Giunta (giunta.gaetano@gmail.com)
  27. * xmlrpc.inc: add support for dateTime objects in both in php_xmlrpc_encode
  28. and as parameter for constructor of xmlrpcvals; add support for timestamps
  29. as parameter for constructor of xmlrpcvals; add option 'dates_as_objects' to
  30. php_xmlrpc_decode to return dateTime objects for xmlrpc datetimes
  31. * benchmark.php, xmlrpc_wrappers.inc: remove usage of split(), deprecated in
  32. php 5.3
  33. * benchmark.php: fixed url of server page used for testing; improved
  34. verification of correspondence of test results; added more variants for
  35. http options comparison
  36. * verify_compat.php: check for php version 5 for client side too
  37. * makefile: remove from build the compat directory
  38. 2009-07-26 - G. Giunta (giunta.gaetano@gmail.com)
  39. * server.php: remove usage of ereg*(), deprecated in php 5.3
  40. 2009-07-16 - G. Giunta (giunta.gaetano@gmail.com) thanks Jean-Jacques Sarton
  41. * xmlrpc.inc: add support for the <ex:nil/> from the apache library, both
  42. in input and output (feature request #...)
  43. * xmlrpc.inc, testsuite.php: remove usage of split(), deprecated in php 5.3
  44. * testsuite.php: flush better results with output_buffering on
  45. * server: php: avoid one warning about static function calls
  46. 2009-07-02 - G. Giunta (giunta.gaetano@gmail.com) thanks Heiko Stuebner
  47. * xmlrpc.inc: fix: when checking the parameters against the signatures xmlrpc
  48. checks for "array" but PHP returns "Array" resulting in a not matches signature
  49. 2009-05-07 - G. Giunta (giunta.gaetano@gmail.com)
  50. * replace all usage of '= & new' with '= new', as this is deprecated in php 5
  51. and has been shown to cause problems too
  52. 2009-05-06 - G. Giunta (giunta.gaetano@gmail.com)
  53. * create php4 branch, rename trunk to 3.0.0beta - it will be the php5-only version
  54. * xmlrpc.inc: removed test for php version and inclusion of compat patches for really
  55. really old versions of php 4
  56. 2009-03-16 - G. Giunta (giunta.gaetano@gmail.com) thanks Tommaso Trani
  57. * move from CVS to SVN on sf.net; file layout now is the same as in packaged lib
  58. * xmlrpc.inc: fix php warning when receiving 'false' in a bool value
  59. * Makefile, doc/Makefile: alter to follow new file layout
  60. * tagged and released as 2.2.2
  61. 2009-02-03 - G. Giunta (giunta.gaetano@gmail.com)
  62. * debugger/action.php: improve code robustness when parsing system.listmethods
  63. and system.describemethods call
  64. * xmlrpc.inc: format floating point values using the correct decimal separator
  65. even when php locale is set to one that uses comma (bug #2517579);
  66. use feof() to test if socket connections are to be closed instead of the
  67. number of bytes read (bug #2556209)
  68. 2008-10-29 - G. Giunta (giunta.gaetano@gmail.com)
  69. * xmlrpcs.inc: allow add_to_map server method to add docs for single params, too
  70. 2008-09-20 - G. Giunta (giunta.gaetano@gmail.com)
  71. * xmlrpc_wrappers.inc: added the possibility to wrap for exposure as xmlrpc
  72. methods plain php class methods, object methods and even whole classes
  73. * testsuite.php, server.php: added test cases for the new code
  74. 2008-09-07 - G. Giunta (giunta.gaetano@gmail.com) thanks Bruno Zanetti Melotti
  75. * xmlrpc.inc: be more tolerant in detection of charset in http headers (fix for bug #2058158)
  76. 2008-04-05 - G. Giunta (giunta.gaetano@gmail.com)
  77. * xmlrpc.inc: fix encoding of UTF8 chars outside of the BMP
  78. * xmlrpcs.inc: fix detection of zlib.output_compression (thanks xbert)
  79. 2008-03-06 - G. Giunta (giunta.gaetano@gmail.com)
  80. * tagged and released as 2.2.1
  81. * Makefile: improve usage on windows xp despite cmd's broken mkdir
  82. 2007-10-26 - G. Giunta (giunta.gaetano@gmail.com) thanks sajo_raftman
  83. * xmlrpc.inc: remove one warning in xmlrpc_client creator
  84. 2007-10-26 - G. Giunta (giunta.gaetano@gmail.com)
  85. * xmlrpc.inc: improve support for windows cp1252 character set (still
  86. commented in the code)
  87. 2007-09-05 - G. Giunta (giunta.gaetano@gmail.com)
  88. * xmlrpc.inc, xmlrps.inc: do not try to set invalid charsets as output for
  89. xml parser, even if user set them up for internal_encoding (helps encoding
  90. to exotic charsets, while decoding to UTF8)
  91. 2007-09-05 - G. Giunta (giunta.gaetano@gmail.com)
  92. * xmlrpc.inc: fix parsing of '1e+1' as valid float
  93. 2007-09-01 - G. Giunta (giunta.gaetano@gmail.com), thanks Frederic Lecointre
  94. * xmlrpcs.inc: allow errorlevel 3 to work when prev. error handler was a static method
  95. * testsuite.php: fix test on setCookie()
  96. 2007-08-31 - G. Giunta (giunta.gaetano@gmail.com)
  97. * xmlrpc.inc: minor fix in cookie parsing
  98. 2007-07-31 - G. Giunta (giunta.gaetano@gmail.com)
  99. * xmlrpc.inc: Fix usage of client::setcookie() for multiple cookies in non-ssl mode
  100. 2007-07-26 - G. Giunta (giunta.gaetano@gmail.com) thanks Mark Olive
  101. * xmlrpc.inc: Fix for bug # 1756274 (usage of cookies in ssl mode)
  102. 2007-04-28 - G. Giunta (giunta.gaetano@gmail.com)
  103. * xmlrpc.inc: give more detailed curl information when DEBUG = 2; fix handling
  104. of case where curl w. keepalive is used and one connection of many fails
  105. * testsuite improvements: add one testcase; give feedbcak while tests are
  106. running
  107. 2007-04-01 - G. Giunta (giunta.gaetano@gmail.com)
  108. * doc/makefile, doc/custom.fo.xsl: improve pdf rendering of php source code
  109. * makefile: recover version number from source instead of having it hardcoded
  110. 2007-03-10 - G. Giunta (giunta.gaetano@gmail.com)
  111. * doc/makefile, doc/convert.php, doc/*.xsl: created customizations xslt to
  112. produce a documentation more in line with the php manual, esp. with regards
  113. to functions synopsis; added jellyfish book cover as local resource and a
  114. screenshot of the debugger too; various updates to the manual source; added
  115. a php script to highlight examples inside html docs
  116. 2007-03-09 - G. Giunta (giunta.gaetano@gmail.com)
  117. * debugger/action.php: css tweak for IE
  118. * added phpunit license file in the phpunit directory
  119. * added link to license (on sf.net site) to many files
  120. 2007-03-04 - G. Giunta (giunta.gaetano@gmail.com)
  121. * Makefile, doc/makefile: assorted improvements
  122. 2007-03-03 - G. Giunta (giunta.gaetano@gmail.com)
  123. * xmlrpc.inc: micro-optimization in declaration of global vars xmlrpcerr, xmlrpcstr
  124. 2007-02-25 Gaetano Giunta <giunta.gaetano@gmail.com>
  125. * removed a couple of warnings emitted in testsuite.php
  126. * doc/makefile: added command for invocation of xxe to generate docs
  127. * better rendering of docs in xml+css format for function prototypes
  128. * updated documentation
  129. * tagged and released as 2.2
  130. 2007-02-22 Gaetano Giunta <giunta.gaetano@gmail.com>
  131. * debugger: workaround for case of magic_quotes_gpc being set (properly
  132. unescape user input); fix case of user not setting msg id in jsonrpc case
  133. when executing a remote method; allow strings, false, true and null as msg id
  134. 2007-02-13 Gaetano Giunta <giunta.gaetano@gmail.com>
  135. * testsuite.php: added one test for automatic encoding/decoding case
  136. 2007-02-05 Gaetano Giunta <giunta.gaetano@gmail.com>
  137. * xmlrpc.inc: slightly faster encoding of UTF8 data to ascii
  138. 2007-01-11 Gaetano Giunta <giunta.gaetano@gmail.com>
  139. * xmlrpc.inc: when calling client::multicall() with an unspecified http version,
  140. use the client default rather than the fixed 'http 1.0'
  141. 2006-09-17 Gaetano Giunta <giunta.gaetano@gmail.com>
  142. * xmlrpc.inc, xmlrpcs.inc, testsuite.php: added support for <NIL/> and
  143. system.getCapabilities, and one more testcase to go with it
  144. 2006-09-05 Gaetano Giunta <giunta.gaetano@gmail.com>
  145. * xmlrpc.inc: fix support for https through proxies; client parses debug
  146. messages sent by client even for compressed responses;
  147. * testsuite.php, parse_args.php: added 3 test cases for proxy connections
  148. 2006-09-01 Gaetano Giunta <giunta.gaetano@gmail.com>
  149. xmlrpc_wrappers.inc: add two more options in wrap_xmlrpc_method and fix
  150. typo to allow obj encoding
  151. 2006-08-28 Gaetano Giunta <giunta.gaetano@gmail.com>
  152. * xmlrpc_wrappers.inc: more options added to wrap_php_function and
  153. wrap_xmlrpc_method
  154. * xmlrpc.inc: pave the way to support for <nil/>
  155. * doc/xmlrpc_php.xml documentation updated
  156. * tagged and released as 2.1
  157. 2006-08-25 Gaetano Giunta <giunta.gaetano@gmail.com>
  158. * xmlrpc.inc: stricter parsing of incoming messages: detect two DATA elements
  159. inside an ARRAY, a STRUCT or SCALAR inside an already filled VALUE
  160. * testsuite.php: added two testcases to check for the above cases
  161. 2006-08-24 Gaetano Giunta <giunta.gaetano@gmail.com>
  162. * xmlrpc.inc: more code optimization in xmlrpcval::serialize() and
  163. php_xmlrpc_encode(); fixed bug where struct elements with non-ascii chars
  164. in their name would not be properly encoded
  165. * testsuite.php: added a testcase for the new bug
  166. 2006-08-23 Gaetano Giunta <giunta.gaetano@gmail.com>
  167. * remove old code left in comments across many files; many more javadoc
  168. comments added
  169. * xmlrpc.inc: a bit of code optimization: reorder switch() statements of
  170. xml parsing element handlers; inline code for xmlrpcval() - this breaks
  171. new xmlrpcval('true') and changes error msgs on new xmlrpcval($x, 'invalid_type')
  172. * testsuite.php: change according to above
  173. * benchmark.php: basic support for xdebug 2 profiling
  174. 2006-08-22 Gaetano Giunta <giunta.gaetano@gmail.com>
  175. * xmlrpc.inc: addscalar() and addstruct() where not returning 1 when adding
  176. data to an already formed value
  177. 2006-08-21 Gaetano Giunta <giunta.gaetano@gmail.com>
  178. * xmlrpcs.inc, xmlrpc.inc: added support for emulating the xmlrpc-extension
  179. API (the full emulation layer is part of the extras package);
  180. fix support for the HTTP 'deflate' encoding
  181. * xmlrpc.inc: better support for http compression with and without CURL;
  182. a minor decoding speedup; added a new function: php_xmlrpc_decode_xml(),
  183. that will convert into the appropriate object the xml representation of
  184. either a request, response or a single value; log reception of invalid
  185. datetime values
  186. * xmlrpcs.inc: add a new parameter and return type to server->service();
  187. let server->add_to_map() accept method definitions without parameter types
  188. * xmlrpc_wrappers.inc: more logging of errors; wrap_php_functions now takes
  189. more options; better support for jsonrpc; escape quote chars when wrapping
  190. remothe servers / remote methods
  191. * added cvs Id tag to files that missed it; speling fixes; updated NEWS files
  192. 2006-08-07 Gaetano Giunta <giunta.gaetano@gmail.com>
  193. * assorted fixes to make the suite more compatible with php 4.0.5 and 5.x
  194. 2006-07-02 Gaetano Giunta <giunta.gaetano@gmail.com>
  195. * xmlrpc_warppers.inc: added new function to wrap entire remote server into
  196. a local php class; changed default calling synopsis of wrap_remote_method,
  197. to ease passing multiple options at a time (but old syntax still works!)
  198. * updated makefile, debugger/action.php in accord with the above
  199. 2006-06-30 Gaetano Giunta <giunta.gaetano@gmail.com>
  200. * added to debugger capability to generate json-rpc code stubs
  201. * added to debugger capability to load and launch self correctly if
  202. controller.php is called directly from outside processes (single url access)
  203. 2006-06-26 Gaetano Giunta <giunta.gaetano@gmail.com>
  204. * moved wrap_php_functions and wrap_xmlrpc_method into a file of their own.
  205. This will let us add further stub functionality without the base lib growing too much.
  206. All of the files that reference this functionality have been modified accordingly.
  207. * made wrap_xmlrpc_method generate better code (with php type juggling), and
  208. some phpdoc for the generated function, too
  209. * added to debugger an option to produce for the user the generated php code
  210. for wrapping a call to a remote method into a php function
  211. 2006-06-22 Gaetano Giunta <giunta.gaetano@gmail.com>
  212. * xmlrpcs.inc: added description of parameters for system.xxx methods (useful with
  213. html-self-documenting servers);
  214. server->service() now returns response object, in case user has need for it...
  215. * xmlrpc.inc: save full response payload into xmlrpcresp obj for better debugging
  216. 2006-06-15 Gaetano Giunta <giunta.gaetano@gmail.com>
  217. * verify_compat.php: more tests
  218. 2006-06-09 Gaetano Giunta <giunta.gaetano@gmail.com>
  219. * xmlrpcs.inc: fixed sending of compressed responses when output compression
  220. is already enabled in php.ini
  221. * verify_compat.php: split tests between server and client cases
  222. 2006-05-29 Gaetano Giunta <giunta.gaetano@gmail.com>
  223. * added new file: verify_compat.php, to help troubleshooting platform
  224. support for the library; added it to makefile, too
  225. 2006-05-24 Gaetano Giunta <giunta.gaetano@gmail.com>
  226. * xmlrpc.inc: removed residual usage of regexp in favour of pregexps; fixed
  227. a bug in specifying Host http header with non std ports
  228. 2006-05-23 Gaetano Giunta <giunta.gaetano@gmail.com>
  229. * xmlrpc.inc: improvements to wrap_php_function: let it deal correctly
  230. with php functions returning xmlrpcresp objs; make it generate also
  231. docs for single parameters (useful for documenting_xmlrpc_server class)
  232. 2006-05-22 Gaetano Giunta <giunta.gaetano@gmail.com>
  233. * xmlrpc.inc, xmlrpcs.inc: minor performance tuning updates: replaced
  234. some explode vs. split, ereg vs. preg, single vs. double quotes
  235. * xmlrpc.inc: fix wrap_xmlrpc_method to NOT rebuild php objects received
  236. from the server by default, as it might pose a security risk
  237. 2006-04-24 Gaetano Giunta <giunta.gaetano@gmail.com>
  238. * minor fixes makefiles. Tagged and released as 2.0 final
  239. 2006-04-22 Gaetano Giunta <giunta.gaetano@gmail.com>
  240. * debugger/*: added option to set cainfo; improve web layout
  241. * xmlrpc.inc: set sslverifypeer to TRUE instaed of 1 by default
  242. * doc/php_xmlrpc.xml: documentation updates
  243. 2006-04-21 Gaetano Giunta <giunta.gaetano@gmail.com>
  244. * xmlrpc.inc: added option to set ca certs dir instead of single cert
  245. (used to validate server in https connetions)
  246. 2006-04-18 Gaetano Giunta <giunta.gaetano@gmail.com>
  247. * xmlrpc.inc: fixed bug in xmlrpcval::structmemexists()
  248. * testsuite.php: added test case for xmlrpcval::structmemexists()
  249. 2006-04-03 Gaetano Giunta <giunta.gaetano@gmail.com>
  250. * xmlrpc.inc: add support for Digest and NTLM authentication, both to server
  251. and to proxies (note: must use CURL for this to work)
  252. * debugger/*: add support for Digest/NTLM auth to remote servers
  253. 2006-03-19 Gaetano Giunta <giunta.gaetano@gmail.com>
  254. * xmlrpc.inc: fix a bug parsing of 'true' bool values;
  255. added a new method to the client class: SetCaCertificate;
  256. add column number in xml parsing error messages;
  257. fix serialization of messages to ISO-8859-1 charset with php 5 (by adding
  258. encoding to the xml prologue of generated messages)
  259. * xmlrpcs.inc: correct detection of charset in http headers;
  260. add column number in xml parsing error messages;
  261. fix serialization of responses to ISO-8859-1 charset with php 5 (by adding
  262. encoding to the xml prologue of generated responses)
  263. * testsuite.php: added two more tests on charset encoding
  264. * NEWS: update info for impending release
  265. 2006-03-23 Gaetano Giunta <giunta.gaetano@gmail.com>
  266. * added a new demo file: simple_call.php
  267. 2006-02-20 Gaetano Giunta <giunta.gaetano@gmail.com>
  268. * xmlrpcs.inc: more error checking and logging with regard to user-coded
  269. method handler functions not being well behaved;
  270. fix a case where error handler would not be reset upon user function
  271. returning not valid xmlrpresp
  272. * xmlrpc.inc: fix bug in detection of php 4.3.0
  273. * Makefile: fix uppercase filenames
  274. 2006-02-15
  275. * xmlrpc.inc: parse 'true' and 'false' as valid booleans, even though the
  276. spec is quite clear on that; fix small bug w. internal_encoding = utf8; add
  277. definition of $GLOBALS['xmlrpcNull'] for extensibility, e.g. json or
  278. extensions to the xmlrpc spec
  279. 2006-02-05 Gaetano Giunta <giunta.gaetano@gmail.com>
  280. * xmlrpc.inc: fix bug in wrap_xmlrpc_method if client passed to function has
  281. return_type=phpvals
  282. * all demo files: review code, add more comments and information
  283. * added 2 demo files: proxy.php (implementing an xmlrpc proxy server) and
  284. wrap.php (showing usage of wrap_method_call)
  285. 2006-02-04 Gaetano Giunta <giunta.gaetano@gmail.com>
  286. * xmlrpc.inc: fix bug in multicall in case of no fallback and server error
  287. 2006-01-30 Gaetano Giunta <giunta.gaetano@gmail.com>
  288. * xmlrpc.inc: fix recursive serialization of xmlrpcvals loosing UTF8 charset;
  289. correctly set type field of xmlrpcvals returned by send() calls
  290. * xmlrpcs.inc: add to server checks for correct return type of user-coded
  291. method handling function; tolerate xmlrpcval instead of xmlrpcresp
  292. * minor change in xmlrpcresp internals, to ease subclassing (store payload
  293. in an internal var on serialize(), same as xmlrpcclient does)
  294. 2006-01-22 Gaetano Giunta <giunta.gaetano@gmail.com>
  295. * benchmark.php: do not run http 1.1 tests if CURL notfound
  296. * Released as 2.0 Rc3
  297. 2006-01-19 Gaetano Giunta <giunta.gaetano@gmail.com>
  298. * xmlrpc.inc: make xmlrpc_client::setDebug() accept int values instead of
  299. boolean. At level 2, the request payload is printed to screen before being
  300. sent; fix bug with repeated sending of the same msg object and using request
  301. compression w. php 5.1.2 (objects passed by ref by default!!!)
  302. * xmlrpcs.inc: fix detection of clients accepting compressed responses
  303. * comment.php: remove warnings due to liberal usage of $HTTP_POST/GET_VARS
  304. * benchmark.php: add a test using http compression of both requests and
  305. responses
  306. * testsuite.php: added test for fix in xmlrpc.inc
  307. 2006-01-17 Gaetano Giunta <giunta.gaetano@gmail.com>
  308. * xmlrpcs.php: minor fix: do not raise a PHP warning when std server is
  309. called via GET (global HTTP_RAW_POST_DATA undefined). Some might have called
  310. it a security breach (path disclosure)...
  311. 2006-01-15 Gaetano Giunta <giunta.gaetano@gmail.com>
  312. * testsuite.php: minor fix to expected date format in http cookie hedaer
  313. to cope with PHP 5.1.2
  314. 2006-01-05 Gaetano Giunta <giunta.gaetano@gmail.com>
  315. * xmlrpcs.inc: merge code from the 'extras' subclass that allows server
  316. to register plain php functions in dispatch map instead of functions
  317. accepting a single xmlrpcmgs obj parameter.
  318. One step closer to the kitchen sink!!!
  319. 2005-12-31 Gaetano Giunta <giunta.gaetano@gmail.com>
  320. * xmlrpcs.inc: let the server accept 'class::method' syntax in the dispatch
  321. map
  322. * testsuite.php, server.php: added new tests for the recent charset encoding
  323. capabilities
  324. 2005-12-24 Gaetano Giunta <giunta.gaetano@gmail.com>
  325. * xmlrpc.inc: correctly serialize() string xmlrpcvals that have been
  326. created out of non-string php variables, when internal encoding is UTF8;
  327. serialize to '0' int and double values created out of non-string php
  328. variables, eg. 'hello', instead of creating invalid xmlrpc;
  329. extend the php_xmlrpc_encode function to allow serializing string values
  330. to charsets other tha US-ASCII;
  331. minor tweak to xml parsing to allow correct parsing of empty strings when
  332. in 'direct to php values' mode
  333. * xmlrpcs.inc: advances in system.multicall with plain php values
  334. 2005-12-17 Gaetano Giunta <giunta.gaetano@gmail.com>
  335. * xmlrpcs.inc: let the functions implementing the system.* methods work
  336. fine when called with plain php values as parameters instead of xmlrpcmsg
  337. objects (multicall not quite finished yet...);
  338. encode level 3 debug info as base64 data, to avoid charset encoding hell
  339. * xmlrpc.inc: added a new xmlrpc_2_php_type function, to get the name of
  340. php types corresponding to xmlrpc types;
  341. in debug mode, when detecting base64 server debug info, print it out fine
  342. * server.php: cosmetic fixes
  343. 2005-12-09 Gaetano Giunta <giunta.gaetano@gmail.com>
  344. * xmlrpc.inc: remove one warning emitted when received xml contains an
  345. unknown tag; remove warnings emitted when custom error handler is set
  346. and user calls php_xmlrpc_encode/decode without the 2nd parameter
  347. * xmlrpcs.inc: added a param to service(), to allow the server to parse
  348. data other than the POST body (useful for subclassing and debugging);
  349. reworked the implementation of server debug messages at debug level 2:
  350. since the debug info generated has no known charset, and putting it back
  351. into the response's xml would most likely break it, send it back to the
  352. client as a base64 encoded comment. Clients can decode it if they need it...
  353. Add some more javadocs
  354. * testsuite.php: modified the string test, to see if the server can echo
  355. back to the client the received data without breaking the response's xml
  356. 2005-12-05 Gaetano Giunta <giunta.gaetano@gmail.com>
  357. * xmlrpc.inc, xmlrpcs.inc: let server and client objects decide if they
  358. want to use some charset encoding other than US-ASCII for serialized data:
  359. add a new var to both objects, and lots of parameters to function calls
  360. that took none up to now;
  361. refactored server method service() and parseRequest(), implementing a
  362. new parserequestHeaders() method to explicitly deal with HTTP
  363. 2005-12-01 Gaetano Giunta <giunta.gaetano@gmail.com>
  364. * moved the jsonrpc implementation and the new wsdl stuff to a separate
  365. CVS module; updated the makefile to reflect it
  366. 2005-11-24 Gaetano Giunta <giunta.gaetano@gmail.com>
  367. * modified php_xmlrpc_decode() to work on xmlrpcmessages too, besides
  368. xmlrpcvals. To achieve this, added a new method: xmlrpcmsg::kindOf()
  369. 2005-11-22 Gaetano Giunta <giunta.gaetano@gmail.com>
  370. * released as 2.0 RC2
  371. 2005-11-21 Gaetano Giunta <giunta.gaetano@gmail.com>
  372. * xmlrpc.inc: fix warnings about references for PHP 4.1.X
  373. * Whitespace cleanup on all the lib
  374. 2005-11-16 Gaetano Giunta <giunta.gaetano@gmail.com>
  375. * xmlrpc.inc: rewritten xmlrpc_encode_entitites adding two extra parameters
  376. that specify input and output charset encodings. This corrects the bug that
  377. prevented native UTF-8 strings to be correctly serialized (to have them
  378. encoded the user must set $xmlrpc_internalencoing appropriately).
  379. * xmlrpc.inc: added new method xmlrpcmsg::parseResponseHeaders(), refactoring
  380. parseResponse(). This makes the code more modular and eases subclassing.
  381. * xmlrpc.inc: set cookies and http headers to xmlrpcresp objs even when calls
  382. to send() do not complete correctly
  383. * added new file: jsonrpcs.inc, to accomodate server jsonrpc objects in the future
  384. * jsonrpc.inc: slow progress...
  385. 2005-11-10 Gaetano Giunta <giunta.gaetano@gmail.com>
  386. * xmlrpc.inc: fixed the xmlrpc_client send and sendpayloadhttps methods
  387. to fix errors in calling https servers;
  388. added a new xmlrpc_client->setkey method to allow usage of client-side ssl
  389. certs in recent php builds;
  390. added to xmlrpcresp objects a content_type var, to be used in HTTP headers
  391. * xmlrpcs.inc: separate generation of content-type http header and xml prologue
  392. from the service() method, to ease subclassing
  393. 2005-11-03 Gaetano Giunta <giunta.gaetano@gmail.com>
  394. * xmlrpc.inc: moved the 'text/xml' mimetype string as class var of the xmlrpcmsg
  395. object instead of having it cabled into xmlrpc_client->send(): this allows to
  396. create subclasses of xmlrpcmsg that use a different mimetype
  397. * jsonrpc.inc: added a new file, with an extremely experimental set of classes,
  398. designed to implement a json-rpc client and server, taking advantage of the
  399. existing xml-rpc infrastructure
  400. 2005-10-28 Gaetano Giunta <giunta.gaetano@gmail.com>
  401. * xmlrpc.inc: changed constructor method for xmlrpcresp, making it smarter in
  402. case user does not declare the type of value it is passing to it;
  403. minor changes in serialization of xmlrpcresp with error codes, so that it
  404. utputs LF instead of CRLF on windows boxes after an FTP transfer of the code, too
  405. 2005-10-26 Gaetano Giunta <giunta.gaetano@gmail.com>
  406. * xmlrpc.inc: added a new var of class xmlrpc_client, indicating what kind of
  407. object will be stored in the value() of xmlrpcresp's gotten from the send()
  408. method: xmlrpxc objects, plain php variables or raw xml. This allow the coder
  409. to make use of xmlrpc_decode for better performances if he wishes so.
  410. Modified creator of xmlrpcresp class to allow it to distinguish between being
  411. created out of raw xml or a plain php string (in the former case, serialization
  412. is still possible, opening a new world of opportunity for server-side programming:
  413. the php function implementing a web service has to provide the xml for the
  414. return value on its own).
  415. Modified xmlrpc_client::multicall() to suit; also added a new parameter which
  416. allows calls to multicall without automatic fallback to many-calls in case of
  417. error (speeding up the process of doing a failed multicall() call quite a bit)
  418. Fixed two bugs in guess_encoding.
  419. Audited all regexps and fixed some.
  420. xmlrpc_client::send() does not call xmlrpcmsg::parseresponsefile() anymore.
  421. Shuffled parseresponse() a little bit
  422. * testsuite.php: added a new testcase for the modifications to multicall():
  423. now we test the case where xmlrpc_client returns php values, too
  424. 2005-10-24 Gaetano Giunta <giunta.gaetano@gmail.com>
  425. * xmlrpc.inc: fixed guess_encoding() to always return uppercase chars
  426. * added new file: benchmark.php. It contains a few tests used to evaluate
  427. speed of the lib in common use cases
  428. * added file parse_args.php, containing common code for benchmark and
  429. testsuite, and modified testsuite.php accordingly
  430. * modified makefile adding new files
  431. * testsuite.php: added a couple of new test cases; fixed one warning
  432. emitted in php 5 E_STRICT mode
  433. 2005-10-20 Gaetano Giunta <giunta.gaetano@gmail.com>
  434. * xmlrpc.inc: modify 3d param of ParseResponse(), allowing the function to
  435. return the raw xml received as value of the xmlrpcresponse object.
  436. This allows eg. to have epi-xmlrpc decode the xml for faster execution.
  437. 2005-10-09 Gaetano Giunta <giunta.gaetano@gmail.com>
  438. * xmlrpc.inc: fixed error that prevented usage of HTTPS (the client
  439. always determined that ssl support was not present)
  440. 2005-10-03 Gaetano Giunta <giunta.gaetano@gmail.com>
  441. * xmlrpc.inc, xmlrpcs.inc: revert direction of stack growth during xml
  442. parsing for faster execution time; add support for detecting charset
  443. encoding of received xml; add support for cookies; better parsing of
  444. javadoc when building stub code in wrap_php_function; add a lot of
  445. javadoc comments everywhere; rewrite most error messages
  446. * testsuite.php: add many tests for newly introduced features
  447. * server.php: add a couple of new functions to support debugging new
  448. features
  449. * debugger: add switches to enable all the latest lib features; minor
  450. improvements to layout
  451. * synch included phpunit with latest PEAR release
  452. * reorganize files included in the distribution in a new hierarchy of folders
  453. * bump revision number to 2.0RC1 and release
  454. 2005-8-14 Miles Lott <milos@groupwhere.org>
  455. * xmlrpc.inc, xmlrpcs.inc: Remove all use of eval() to avoid potential
  456. security hole.
  457. * As of this release we are no longer php3-compatible.
  458. 2005-8-10 Miles Lott <milos@groupwhere.org>
  459. * xmlrpc.inc, xmlrpcs.inc: Switched to using $GLOBALS instead of calling
  460. global $varname
  461. 2005-07-22 Miles Lott <milos@groupwhere.org>
  462. * Removed: bug_* files
  463. 2005-07-14 Gaetano Giunta <giunta.gaetano@gmail.com>
  464. * debugger: added a workaround to disable using the debugger for attacking
  465. older versions of the lib
  466. * testsuite.php: added code to test wrap_xmlrpc_method;
  467. use different wording for failed tests
  468. * xmlrpcs.inc: change for() with foreach() in system.* methods implementations;
  469. remove a possible cause of php warning;
  470. * xmlrpc.inc: let wrap_php_function and wrap_xmlrpc_method find suitable
  471. function names if default function names are already in use;
  472. correct wrap_xmlrpc_method to not set http protocol to 1.0 when not asked to;
  473. detect curl compiles without SSL
  474. 2005-07-14 Gaetano Giunta <giunta.gaetano@gmail.com>
  475. * xmlrpc.inc: more auto-fix of xmlrpc_client path: '' -> '/';
  476. change to the method used for detecting failed evals (php 4.0.x compatibility);
  477. complete rework of return-by-ref functions to comply with php 4.4.0
  478. * xmlrpcs.inc: change to the method used for detecting failed evals (php 4.0.x
  479. compatibility)
  480. * testsuite.php: major rewrite of the multi- tests, to give better feedback on
  481. number of failed tests;
  482. flush html page title to screen before starting tests;
  483. 2005-07-13 Gaetano Giunta <giunta.gaetano@gmail.com>
  484. * xmlrpc.inc: let xmlrpcmsg creator be forgiving of target paths that miss the
  485. starting '/' char;
  486. completely reworked assign-by-ref to be compliant with php 4.4.0 stricter
  487. warnings
  488. * testsuite.php: added ability to be run from cli: (really dumb) separation of
  489. html and plain text outputs + parsing of argv parameters
  490. 2005-07-12 Gaetano Giunta <giunta.gaetano@gmail.com>
  491. * xmlrpc.inc: compatibility fixes with PHP versions 4.0.x (and remove some for
  492. PHP 3)
  493. * xmlrpcs.inc: compatibility fixes for PHP 4.0.x versions
  494. * testsuite.php: better support for running with php versions 4.0.x;
  495. do not generate runtime errors but finish tests anyway if some calls to
  496. localhost fail;
  497. correctly detect a localhost port different from 80 for running tests against
  498. 2005-07-11 Gaetano Giunta <giunta.gaetano@gmail.com>
  499. * xmlrpc.inc: preliminary building of method signature and docs in
  500. wrap_php_function;
  501. fix a bug in extracting function description from javadoc block in
  502. wrap_php_function;
  503. small fix for better compatibility with php < 4.2.0
  504. * added compat subdir with extra code, taken form PEAR package Compat, to let
  505. the lib run fine with php 4 versions < 4.1
  506. 2005-07-10 Gaetano Giunta <giunta.gaetano@gmail.com>
  507. * xmlrpc.inc: some nazi whitespace corrections;
  508. declared global $xmlrpcBoolean too (was the only one missing);
  509. used @eval inside getval() to have less path disclosure security reports filed
  510. in the future;
  511. added new global var: $xmlrpcValue, to be used in server dispatch maps as
  512. placeholder for a param which can be of any kind;
  513. big chunks (but still incomplete) of javadoc parsing in wrap_php_function
  514. + changed type of return val - now it is the complete array to be put in the
  515. dispatch map
  516. * xmlrpcs.inc: let previous error handler be called by server to handle errors
  517. even if in debug level 3;
  518. default to compress responses if zlib installed;
  519. added a new val useful for only checking number (not type) of params in method
  520. calls;
  521. let user use object methods in dispatch map using the
  522. array($obj, 'fmethodname') format
  523. * server.php: Added code called by testsuite.php to exercise registration of
  524. object methods as xmlrpc methods and auto-registration of php functions as xmlrpc
  525. methods
  526. * testsuite.php: added tests to exercice server registering object methods as
  527. xmlrpc methods and automatic registration of php functions as server methods;
  528. added a hint to enable debug if some test goes wrong;
  529. renamed https test for better clarity
  530. 2005-07-07 Gaetano Giunta <giunta.gaetano@gmail.com>
  531. * xmlrpc.inc: added function to be used for 'guestimating' charset encoding of
  532. received xml (not activated yet)
  533. * server.php: Let server compress content by default if user asks so: it allows
  534. testsuite to check for compressed responses
  535. * testsuite.php: added suite of tests for compressed responses; test CURL
  536. (http1.1) with all possible compression combinations too
  537. 2005-07-06 Gaetano Giunta <giunta.gaetano@gmail.com>
  538. * xmlrpc.inc: Enable setting usage of keepalives on/off (for CURL cases);
  539. implement compression of xmlrpc requests; enable new syntax of xmlrpclient
  540. constructor: 1 - allow preferred http method to be set at creation time,
  541. 2 - allow user to insert a single complete URL as only parameter and parse it;
  542. try to detect if curl is present whether it has been compiled w. zlib to enable
  543. automatically the reception of compressed responses
  544. * xmlrpcs.inc: do not add into logs the content of the request, if it was
  545. received gzipped/deflated, to avoid breaking the xml sent back as response
  546. (NB: might be investigated further: is the problem caused by windows chars in
  547. the range 128-160 ?)
  548. * testsuite.php: run all localhost tests 2 more times, to stress request
  549. compression;
  550. run all localhost tests in a row using keepalives, to test keepalive
  551. functionality
  552. 2005-07-05 Gaetano Giunta <giunta.gaetano@gmail.com>
  553. * xmlrpc.inc: let CURL pass back to caller function the complete PHP headers
  554. as it did before: it enables better logging / debugging of communication;
  555. small change to the way CURL declares its ability to receive compressed
  556. messages (fix for the case where zlib is compiled in PHP but not in curl);
  557. added Keep-alive (ON BY DEFAULT) for http 1.1 and https messages (had to modify
  558. a lot of functions for that);
  559. always make sure a 'Connection: close' header is sent with curl connections if
  560. keep-alive is not wanted
  561. * phpunit.php: switched to PEAR PHPUnit (rel 1.2.3), since it is maintained a
  562. lot more than the old version we were using
  563. * added new folder with code of phpunit classes
  564. * testsuite.php: added a new run of tests to check for compliance of client
  565. when using http 1.1;
  566. switched to PEAR PHPUnit classes;
  567. divided test for client ability to do multicall() into 2 separate tests
  568. 2005-06-30 Gaetano Giunta <giunta.gaetano@gmail.com>
  569. tagged and released version 1.1.1, backporting security fixes from HEAD
  570. 2005-06-28 Gaetano Giunta <giunta.gaetano@gmail.com>
  571. * xmlrpcs.inc: fix changes introuced yesterday in a rush;
  572. do not list system.* methods for a server that has them explicitly disabled
  573. * bug_inject.xml: new test case used to check for code injection vulnerability
  574. * testsuite.php: added a test case for zero parameters method calls;
  575. added two test cases for recently found code injection vulnerabilities
  576. 2005-06-27 Gaetano Giunta <giunta.gaetano@gmail.com>
  577. * xmlrpc.inc: (tentative) fix for security problem reported by
  578. security@gulftech.org: we were not properly php-escaping xml received for
  579. BASE64 and NAME tags;
  580. some more patching related to junk received in xml messages/responses: if the
  581. PHP code built from the parsed xml is broken, catch any generated errors
  582. without echoing it to screen but take note of the error and propagate to user
  583. code
  584. * xmlrpcs.inc: some more patching related to junk received in xml messages/
  585. responses: if the PHP code built from the parsed xml is broken, catch any
  586. generated errors without echoing it to screen but take note of the error and
  587. propagate to user code
  588. 2005-06-24 Gaetano Giunta <giunta.gaetano@gmail.com>
  589. * xmlrpc.inc: fixed php_xmlrpc_encode detection of php arrays (again!);
  590. removed from wrap_php_function the part about setting a custom error handler
  591. (it can be activated using the more general $server->setdebug(3) anyway)
  592. * xmlrpcs.inc: added to server the capability to trap all processing errors
  593. during execution of user functions and add them to debug info inside responses;
  594. return a (new) xmlrpcerr response instead of raising some obscure php execution
  595. error if there is an undefined function in the dispatch map
  596. * testsuite.php: Added new testcases for recently implemented stuff
  597. 2005-06-23 Gaetano Giunta <giunta.gaetano@gmail.com>
  598. * xmlrpc.inc: added new method: xmlrpcval->structmemexists, to check for
  599. presence of a wanted struct member without having to loop through all members;
  600. fix wrap_php_functions: correctly return false for php internal functions,
  601. whose param list is unknown;
  602. let addscalar fail as it should if called on struct vals;
  603. fix addstruct: do not fail when called for adding stuff to initialized structs;
  604. removed a warning generated when calling addscalar with inexistent type;
  605. massive code review for speed: replaced each() loops with foreach(), removed
  606. lots of useless assignments and duplications of data;
  607. added 'http11' as valid method param for xmlrpclient->send: makes use of curl
  608. for sending http 1.1 requests;
  609. changed a couple '=' into '=&' where objects are returned;
  610. fixed wrap_php_function() to better detect php errors while processing wrapped
  611. function
  612. * xmlrpcs.inc: Fix php warnings generated when clients requested method
  613. signature / description for a method that had none in its dispatch map;
  614. turned server->debug into an integer value that will change the amount of
  615. logging going as comments into xmlrpc responses
  616. * server.php: set default server debug level to 2
  617. * testsuite.php: removed calls to deleted functions (xmlrpc_encode,
  618. xmlrpc_decode);
  619. added html page title describing target servers used for tests;
  620. added an assign-by-ref
  621. * phpunit.php: Do not consider as failures PHP 5 E_STRICT errors (arbitrary
  622. choice, but lib is targeted at PHP 4)
  623. 2005-06-22 Gaetano Giunta <giunta.gaetano@gmail.com>
  624. * xmlrpc.inc: removed lottsa old code that had been left in commented
  625. * xmlrpc.inc: fixed setting of proxy port
  626. * xmlrpc.inc: removed one warning when trying to decompress junk sent as
  627. deflated response
  628. * xmlrpc.inc: changed the error messages (but not the code) that will be found
  629. in xmlrpcresponses when there are socket errors, to differentiate from HTTP
  630. errors
  631. * xmlrpc.inc: refactored xmlrpcclient->sendpayloadHTTPS: now it calls a new
  632. method (sendpayloadCURL) that could be used also for generating HTTP 1.1
  633. requests
  634. * xmlrpc.inc: added two new methods: wrap_php_function and wrap_xmlrpc_method:
  635. designed to let the lazy programmer automagically convert php functions to
  636. xmlrpc methods and vice versa. Details are in the code
  637. * debugger/*: added initial revision of a 'universal xmlrpc debugger'
  638. 2005-06-20 Gaetano Giunta <giunta.gaetano@gmail.com>
  639. * xmlrpc.inc: replace usage of 'echo' with error_log when errors arise
  640. in manipulation of xmlrpcval objects
  641. * xmlrpc.inc: replaced <br> with <br /> in dump function
  642. * xmlrpc.inc: added method structsize to xmlrpcval class (alias for arraysize)
  643. * xmlrpc.inc: addarray() now will add extra members to an xmlrpcval object
  644. of array type; addstruct() can be used to add members to an xmlrpcval object
  645. of struct type
  646. * xmlrpcs.inc: Added member allow_system_funcs to server: controls whether the
  647. server accepts or not calls to system.* functions
  648. 2005-05-10 Gaetano Giunta <giunta.gaetano@gmail.com>
  649. * xmlrpc.inc: fix regression in php_xmlrpc_encode when encoding php hashes;
  650. fix decompression of gzip/deflated xmlrpc responses;
  651. set user agent string correctly in SSL mode (was forgetting lib name);
  652. add allowed encoding http headers in requests;
  653. do not pass http headers back from curl to parseresponse, to avoid re-decoding
  654. compressed xml or http 100 headers
  655. * xmlrpcs.inc: added method setDebug;
  656. renamed compress_output to compress_response;
  657. do not try to set http headers if they have already been sent, because trying
  658. to do so will raise a PHP error, and if headers have been sent something has
  659. gone wrong already (shall we send a meaningful error response instead?)
  660. 2005-05-08 Gaetano Giunta <giunta.gaetano@gmail.com>
  661. * xmlrpcs.inc, xmlrpcs.inc: reverted to usage of '=& new' for better
  662. performance on (some) php4 installs.
  663. NB: PHP 3 compatibility is deprecated from now on!
  664. * xmlrpc.inc: decode xmlrpc boolean type to native php boolean
  665. * xmlrpcs.inc, xmlrpcs.inc: switched $_xh[$parser] to $_xh, since indexing
  666. an array by object will give a warning in php 5 (and we were resetting the
  667. array of _xh elements on every call anyway)
  668. * xmlrpc.inc: commented unused code used originally for escaping content
  669. * xmlrpc.inc: commented deprecated methods xmlrpc_encode and xmlrpc_decode
  670. * xmlrpc.inc: php_xmlrpc_encode: encode integer-indexed php arrays as xmlrpc
  671. arrays instead of structs; if object given to encode is an xmlrpcval return it
  672. instead of reencoding (makes easier calling encode on an array of xmlrpcvals)
  673. * xmlrpcs.inc: added $debug field to server class; if false will prevent
  674. the server from echoing debug info back to the client as xml comment
  675. * xmlrpcs.inc: let the server add to the debug messages the complete request
  676. payload received and (if php installed as apache module) http headers, so that
  677. the client in debug mode can echo a complete fingerprint of the communication
  678. * xmlrpcs.inc: changed API of ParseRequest method: now it cannot be called
  679. without a 'data' parameter; added 2nd parameter (http encoding); changed the
  680. call to this method from inside service() method
  681. * xmlrpc.inc, xmlrpcs.inc: enable both server and client to parse compressed xml
  682. (if php is compiled with zlib); client should also be able to decode chunked
  683. http encoding
  684. * xmlrpc.inc: add support for proxies (only basic auth supported); default port
  685. is 8080 (if left unspecified)
  686. * xmlrpc.inc: use lowercase for names of http headers received (makes using
  687. them much simpler, since servers can use any upper/lowercase combination)
  688. * xmlrpc.inc: bumped version number to '2.0 beta'
  689. 2005-05-08 Gaetano Giunta <giunta.gaetano@gmail.com>
  690. * release of version 1.1
  691. 2005-04-24 Gaetano Giunta <giunta.gaetano@gmail.com>
  692. * xmlrpcs.inc: removed charset declaration from xml prologue of responses,
  693. since we are now escaping all non-ascii chars in an encoding-independent way
  694. * bug_http.xml: modified to exercise some extra functonality of the lib
  695. (it should now be failed by the current PEAR implementation of the lib)
  696. * xmlrpc.inc: bumped up rev. number to 1.1
  697. * doc/xmlrpc_php.xml, doc/announce1_1.txt: documentation updates
  698. * Makefile: updated to reflect new xml doc source, modified filelist
  699. 2005-04-17 Gaetano Giunta <giunta.gaetano@gmail.com>
  700. * client.php, agesort.php, introspect.php, introspect_demo.php,
  701. which.php, test.pl, test.py: use as default target the server.php page hosted
  702. on phpxmlrpc.sf.net
  703. * server.php: fix for register_globals off; refer to docs on phpxmlrpc.sf.net
  704. 2005-04-15 Miles Lott <milos@groupwhere.org>
  705. code formatting and comments
  706. 2005-04-03 Gaetano Giunta <giunta.gaetano@gmail.com>
  707. * xmlrpc.inc: make use of global var $xmlrpcName in building User_Agent HTTP
  708. header (in conjunction with $xmlrpcVersion)
  709. * agesort.php, client.php, comment.php, dicuss.php, mail.php, server.php,
  710. which.php: various janitorial fixes
  711. + always html escape content received from xmlrpc server or from user input
  712. + make the scripts run fine with register_globals off an register_long_arrays off
  713. + always use the functions php_xmlrpc_en(de)code, even if the EPI extension
  714. is not installed
  715. + in mail.php, allow user to see script source even if support for .phps files
  716. is not configured in the local web server
  717. * testsuite.php: better detection of local webserver hostname for running tests
  718. against (if the user did not supply a webserver name)
  719. 2005-03-21 Gaetano Giunta <giunta.gaetano@gmail.com>
  720. * xmlrpcs.inc: revert to a PHP3 compatible script (change '=& new' to '= new')
  721. * xmlrpc.inc: revert to a PHP3 compatible script (lottsa fixes)
  722. * testsuite.php: default to using local server as test target if no user
  723. provided values are available instead of heddley.com server
  724. * testsuite.php: play nice to PHP3 in retrieving user-passed values
  725. * testsuite.php: fix constructor method name for a type of tests
  726. * phpunit.php: fix all cases of call-time-pass-by-ref
  727. * phpunit.php: rename Exception class to _Exception if the script is run with
  728. PHP 5 (exception is a reserverd word)
  729. 2005-03-19 Gaetano Giunta <giunta.gaetano@gmail.com>
  730. * xmlrpc.inc: fixed bug in new http header parsing code in case there is
  731. no correct separator between response headers and body
  732. * xmlrpc.inc: added recognizing and stripping of HTTP/1.1 100 response headers
  733. * xmlrpc.inc: strip extra whitespace from response body, as well as any junk
  734. that comes after the last </MethodResponse> tag. It allows the server code to
  735. be put on public providers that add e.g. javascript advertising to served pages
  736. * xmlrpc.inc: removed unused parts of code, trailing whitespace
  737. * xmlrpc.inc: fix possible bug (?) in xmlrpc_ee for BOOLEAN values: true was
  738. being handled differently than false
  739. * testsuite.php: added a new file-based test to stress the response parsing
  740. modifications recently introduced; enabled debugging for file based tests
  741. 2005-03-15 Gaetano Giunta <giunta.gaetano@gmail.com>
  742. * xmlrpc.inc: fixed missing declaration of global vars in xmlrpc_dh,
  743. sendpayloadhttps and sendpayloadhttp10
  744. * xmlrpc.inc: changed error message for invalid responses: 'enable debugging'
  745. is more clear that 'enabling debugging' (the user is being encouraged to do it)
  746. * xmlrpc.inc: rewrote HTTP response header parsing. It should be more tolerant
  747. of invalid headers, give more accurate error messages and be marginally faster,
  748. too.
  749. * xmlrpc.inc: cosmetic whitespace fixes and remove useless one-liners
  750. * xmlrpc.inc: build a shorter PHP command line to be evaluated for rebuilding
  751. values from parsed xml: use '$val =& nex xmlrpcval("value")' for string values
  752. instead of '$val =& nex xmlrpcval("value", $xmlrpcString)'
  753. * xmlrpc.inc: fix change introduced 2005/01/30 moving call to curl_close()
  754. too early: it did not work on error situations
  755. * testsuite.php: fix name of testAddingTest method, renamed testErrosString
  756. into testErrorString and removed useless warning for register_globals=off case
  757. 2005-02-27 Gaetano Giunta <giunta.gaetano@gmail.com>
  758. * xmlrpc.inc: do not echo XML parsing error to screen (it is already dumped
  759. into error log)
  760. * xmlrpc.inc: set hdrs field into response object in case of XML parsing error
  761. (uniform behaviour with other responses)
  762. 2005-02-26 Gaetano Giunta <giunta.gaetano@gmail.com>
  763. * xmlrpc.inc: use global var $xmlrpcVersion as number for user agent string
  764. * xmlrpcs.inc: eliminate server side PHP warning and give back to caller
  765. a better error msg in case the called method exists but no signature matches
  766. the number of parameters
  767. 2005-02-20 Gaetano Giunta <giunta.gaetano@gmail.com>
  768. * xmlrpc.inc: accept a + sign in front of floats / integers, since the spec
  769. clearly mentions it
  770. * xmlrpc.inc, xmlrpcs.inc: renamed function XmlEntities to xmlrpc_encode_entitites,
  771. to avoid using the same name as an array already defined
  772. * xmlrpc.inc: fix bug introduced with escaping of UTF8 chars in xmlrpc error
  773. responses: correct behaviour is to escape chars inside serialize(), not when
  774. calling the xmlrpcresp creator
  775. * testsuite.php: made test suite more friendly to modern PHP configs, allowing
  776. register_globals to be off and to set in the URL all testing parameters;
  777. added tests for newly introduced fixes; renamed existing tests acording to the
  778. docs inside phpunit.php (e.g. no subclass of TestCase should have a name
  779. starting with test...)
  780. 2005-02-19 Gaetano Giunta <giunta.gaetano@gmail.com>
  781. * xmlrpc.inc: accept patch 683153 by mah0: if timeout is set, allow all socket
  782. operations to timeout at the given time, not only the socket connection
  783. 2005-02-13 Gaetano Giunta <giunta.gaetano@gmail.com>
  784. * xmlrpc.inc: be tolerant to double values received in exponential notation:
  785. even though the spec forbids their usage PHP is fine with them
  786. * xmlrpc.inc: fix bug: new xmlrpcval('-1') was creating an empty value instead
  787. of a string value!
  788. * xmlrpc.inc, xmlrpcs.inc: fix the payload encoding changes introduced by
  789. Andres Salomon on 2004-03-17: sending named html entities inside an xml chunk
  790. makes it invalid, and thus renders the lib absolutely non-interoperable with
  791. any other xmlrpc implementation; moreover the current implementation only ever
  792. worked for non-ascii requests, while breaking client-parsing of responses
  793. containing non-ascii chars.
  794. The principle of using entities is preserved though, because it allows the
  795. client to send correct xml regardless of php internal charset encoding vs.
  796. xml request charset encoding, but using 'character references' instead.
  797. * xmlrpc.inc: encode (non-ascii) chars into charset entities also for error
  798. strings
  799. * xmlrpcs.inc: encode (non-ascii) chars into charset entities also for debug
  800. messages
  801. * xmlrpcs.inc: added 'Accept-Charset' header in http request to let the server
  802. know what kind of charset encoding we do expect to be used for responses
  803. * xmlrpc.inc, xmlrpcs.inc: explicitly tell the xml parser what charset the
  804. application expects to receive content in (notably strings). A new variable,
  805. $xmlrpc_internalencoding, (defaulting to ISO-8859-1) defines what charset the
  806. parser will use for passing back string xmlrpcvals to the PHP application
  807. (both server-side and client-side).
  808. This allows transparent usage of e.g. UTF-8 for encoding xml messages between
  809. server and client and ISO-8859-1 for internal string handling.
  810. ISO-8859-1 is, AFAIK, PHP internal encoding for all installs except
  811. mbstring-enabled ones.
  812. 2005-02-12 Gaetano Giunta <giunta.gaetano@gmail.com>
  813. * xmlrpcs.inc: use '$var =& new(' construct to assign objects: on older versions
  814. of PHP objects are first built then copied over if the ampersand is omitted.
  815. Using it should make the code a little bit faster...
  816. * doc/xmlrpc.php: update lib version number, release date in preparation for
  817. next release
  818. * makefile: update lib version number in preparation for next release
  819. * xmlrpc.inc: split up parsing of xmlrpc INT and DOUBLE values. This allows
  820. finer-grained control over valid values: now the '.' char is not allowed
  821. any more inside int values.
  822. * xmlrpc.inc: fix for bug #560303: ints and doubles starting with '0' chars are
  823. no more parsed as octal values
  824. 2005-01-30 Gaetano Giunta <giunta.gaetano@gmail.com>
  825. * xmlrpc.inc: Modifed last change by Miles: the functions php_xmlrpc_encode
  826. and php_xmlrpc_decode are now always defined, regardless of the existence of
  827. XMLRPC-EPI. This allows users to start using these functions as the 'default'
  828. functions, and pave the way for future deprecation of xmlrpc_encode/encode
  829. while maintaining a stable API.
  830. * xmlrpc.inc: use '$var =& new(' construct to assign objects: on older versions
  831. of PHP objects are first built then copied over if the ampersand is omitted.
  832. Using it should make the code a little bit faster...
  833. * xmlrpc.inc: close curl connection as soon as possible for https requests:
  834. it could save some memory / resources.
  835. * xmlrpc.inc: added some extra info in the PHP error log message generated
  836. when an invalid xmlrpc integer/float value is encountered and we try to
  837. deserialize it.
  838. * xmlrpc.inc: added @ char before fsockopen to avoid echoing useless warnings
  839. when connection to server fails; added the same to avoid echoing warnings when
  840. deserializing data of an unknown type
  841. * xmlrpc.inc: reset the _xh array on each xmlrpc call: otherwise a new array
  842. member is created for each consecutive call and never destroyed, thus making it
  843. impossible to build an xmlrpc-client daemon beacuse of memory leaking.
  844. * xmlrpc.inc: declare global the variables that are used as 'constants',
  845. so that xmlrpc.inc will work even if it is included from within a function
  846. 2004-12-27 Miles Lott <milos@groupwhere.org>
  847. * xmlrpc.inc: A new constant, XMLRPC_EPI_ENABLED, is defined depending on
  848. the existence of the function, xmlrpc_decode. This function will exist in
  849. PHP if the extension, XMLRPC-EPI (http://xmlrpc-epi.sourceforge.net), is
  850. loaded. It defines the functions xmlrpc_encode and xmlrpc_decode, which
  851. will conflict with functions of the same name in xmlrpc.inc. If this
  852. extension is loaded, we instead use the names php_xmlrpc_encode and
  853. php_xmlrpc_decode. Please look at server.php, testsuite.php, etc., for
  854. how this should be handled if using these functions.
  855. 2003-04-17 Andres Salomon <dilinger@voxel.net>
  856. * xmlrpc.inc: encode strings using htmlentities() instead of
  857. htmlspecialchars(), and add xmlrpc_html_entity_xlate(). This
  858. should fix longstanding issues with sending weird chars (from
  859. non-USASCII codesets like UTF-8, ISO-8859-1, etc) that caused
  860. the xml parser to choke. Multi-byte chars are now changed to
  861. entities before sending, so that the xmlrpc server doesn't need
  862. to know the encoding type of the POST data.
  863. * xmlrpcs.inc: call xmlrpc_html_entity_xlate before parsing
  864. request packet. The parser chokes on unknown entities (the
  865. entities created by htmlentities() are exactly that; html
  866. entities, not xml entities), so they must be converted from
  867. name form (&eacute;) to numerical form (&#233;).
  868. 2003-01-12 Andres Salomon <dilinger@voxel.net>
  869. * released 1.0.99.2.
  870. * Makefile: separate doc/Makefile a bit more from Makefile,
  871. and add clean rules.
  872. 2003-01-10 Andres Salomon <dilinger@voxel.net>
  873. * xmlrpc.inc: xmlrpcresp and parseResponse cleanups; variable
  874. name renames ('xv' to 'val', for example), type checking, and
  875. stricter default values.
  876. * xmlrpc.inc: fix xmlrpcresp's faultcode; return -1 for FAULT
  877. responses from the server whose faultcodes don't reflect any
  878. errors.
  879. 2003-01-08 Andres Salomon <dilinger@voxel.net>
  880. * xmlrpc.inc: rename $_xh[$parser]['ha'] to
  881. $_xh[$parser]['headers'].
  882. * xmlrpc.inc: fix bugs related to $_xh[$parser]['headers];
  883. some places treated this as an array, others as a scalar.
  884. Treat unconditionally as an array. Also wrap header debugging
  885. output in PRE tags.
  886. 2002-12-17 Andres Salomon <dilinger@voxel.net>
  887. * released 1.0.99.
  888. * Makefile: changed the tarball format/dist rule to a more
  889. conventional form, as well as normal release updates.
  890. * xmlrpc.inc: added setSSLVerifyPeer and setSSLVerifyHost; as
  891. of curl 7.10, various certificate checks are done (by default).
  892. The default for CURLOPT_SSL_VERIFYHOST is to ensure the common
  893. name on the cert matches the provided hostname. This breaks a
  894. lot of stuff, so allow users to override it.
  895. * doc/xmlrpc_php.sgml: updated documentation accordingly.
  896. 2002-09-06 Geoffrey T. Dairiki <dairiki@dairiki.org>
  897. Add support for system.multicall() to both the client
  898. and the server.
  899. * testsuite.php: Add new tests 'testServerMulticall',
  900. and 'testClientMulticall'.
  901. * xmlrpc.inc: Added new error messages for system.multicall().
  902. * xmlrpcs.inc: Added new procedure call system.multicall().
  903. See http://www.xmlrpc.com/discuss/msgReader$1208 for details.
  904. * xmlrpc.inc: Added system.multicall functionality to
  905. xmlrpc_client. xmlrpc_client::send can now take an array of
  906. xmlrpcmsg's as an argument. In that case it will attempt
  907. to execute the whole array of procure calls in a single
  908. HTTP request using system.multicall(). (If that attempt fails,
  909. then the calls will be excuted one at a time.) The return
  910. value will be an array of xmlrpcresp's (or 0 upon transport
  911. failure.)
  912. 2001-11-29 Edd Dumbill <edd@usefulinc.com>
  913. * xmlrpc.inc: fixed problem with processing HTTP headers that
  914. broke any payload with more than one consecutive newline in it.
  915. also initialise the 'ac' array member to empty string at start.
  916. * testsuite.php: added unit test to exercise above bug
  917. * xmlrpcs.inc: fixed uninitialized variable $plist
  918. 2001-09-25 Edd Dumbill <edd@usefulinc.com>
  919. * xmlrpc.inc: applied urgent security fixes as identified by Dan
  920. Libby
  921. 2001-08-27 Edd Dumbill <edd@usefulinc.com>
  922. * xmlrpc.inc: Merged in HTTPS support from Justin Miller, with a
  923. few additions for better traceability of failure conditions. Added
  924. small fix from Giancarlo Pinerolo. Bumped rev to 1.0. Changed
  925. license to BSD license.
  926. 2001-06-15 Edd Dumbill <edd@usefulinc.com>
  927. * xmlrpcs.inc: Added \r into return MIME headers for server class
  928. 2001-04-25 Edd Dumbill <edd@usefulinc.com>
  929. * server.php: Added interop suite of methods.
  930. 2001-04-24 Edd Dumbill <edd@usefulinc.com>
  931. * testsuite.php: added in test case for string handling bug.
  932. * xmlrpc.inc: merged in minor fixes from G Giunta to fix
  933. noninitialization. Created new method, getval(), which includes
  934. experimental support for recreating nested arrays, from Giunta and
  935. Sofer. Fixed string handling bug where characters after </string>
  936. but before </value> weren't ignored. Added in support for native
  937. boolean type into xmlrpc_encode (Giunta).
  938. * xmlrpcs.inc: updated copyright notice
  939. 2001-01-15 Edd Dumbill <edd@usefulinc.com>
  940. * xmlrpc.inc: fixed bug with creation of booleans. Put checks in
  941. to ensure that numbers were really numeric. Fixed bug with
  942. non-escaping of dollar signs in strings.
  943. * testsuite.php: created test suite.
  944. 2000-08-26 Edd Dumbill <edd@usefulinc.com>
  945. * xmlrpcs.inc: added xmlrpc_debugmsg() function which outputs
  946. debug information in comments inside the return payload XML
  947. * xmlrpc.inc: merged in some changes from Dan Libby which fix up
  948. whitespace handling.
  949. * xmlrpcs.inc: added Content-length header on response (bug from
  950. Jan Varga <varga@utcru.sk>. This means you can no longer print
  951. during processing
  952. * xmlrpc.inc: changed ereg_replace to str_replace in several
  953. places (thanks to Dan Libby <dan@libby.com> for this).
  954. * xmlrpc.inc: added xmlrpc_encode() and xmlrpc_decode() from Dan
  955. Libby--these helper routines make it easier to work in native PHP
  956. data structures.
  957. 2000-07-21 Edd Dumbill <edd@usefulinc.com>
  958. * xmlrpc.inc: added xmlrpc_client::setCredentials method to pass
  959. in authorization information, and modified sendPayload* methods to
  960. send this OK. Thanks to Grant Rauscher for the impetus to do this.
  961. Also, made the client send empty <params></params> if there are no
  962. parameters set by the user.
  963. * doc/xmlrpc_php.sgml: updated documentation to reflect recent
  964. changes
  965. 2000-07-18 Edd Dumbill <edd@usefulinc.com>
  966. * server.php: added examples.invertBooleans method to server as a
  967. useful test method for boolean values.
  968. * xmlrpc.inc: rearranged the way booleans are handled to fix
  969. outstanding problems. Fixed calling addScalar() on arrays so it
  970. works. Finally fixed backslashification issues to remove the
  971. problem will dollar signs disappearing.
  972. * booltest.php: really fixed booleans this time.
  973. 2000-06-03 Edd Dumbill <edd@usefulinc.com>
  974. * xmlrpcs.inc: made signature verification more useful - now
  975. returns what it found was wrong
  976. * xmlrpc.inc: fixed bug with decoding dateTimes. Also fixed a bug
  977. which meant a PHP syntax error happened when attempting to receive
  978. empty arrays or structs. Also fixed bug with booleans always being
  979. interpreted as 'true'.
  980. * server.php: Added validator1 suite of tests to test against
  981. validator.xmlrpc.com
  982. 2000-05-06 Edd Dumbill <edd@usefulinc.com>
  983. * released 1.0b6
  984. * added test.pl and test.py, Perl and Python scripts that exercise
  985. server.php somewhat (but not a lot)
  986. * added extra fault condition for a non 200 OK response from the
  987. remote server.
  988. * added iso8601_encode() and iso8601_decode() to give some support
  989. for passing dates around. They translate to and from UNIX
  990. timestamps. Updated documentation accordingly.
  991. * fixed string backslashification -- was previously a little
  992. overzealous! new behavior is '\' --> '\\' and '"' -->
  993. '\"'. Everything else gets left alone.
  994. 2000-04-12 Edd Dumbill <edd@usefulinc.com>
  995. * updated and bugfixed the documentation
  996. * fixed base 64 encoding to only happen at serialize() time,
  997. rather than when a base64 value is created. This fixes the double
  998. encoding bug reported by Nicolay Mausz
  999. <castor@flying-dog.com>. The same approach ought to be taken with
  1000. encoding XML entities in the data - this is a TODO.
  1001. * integrated further code from Peter Kocks: used his new code for
  1002. send(), adding a second, optional, parameter which is a timeout
  1003. parameter to fsockopen()
  1004. 1999-10-11 Edd Dumbill <edd@usefulinc.com>
  1005. * added bug fixes from Peter Kocks <peter.kocks@baygate.com>
  1006. 1999-10-10 Edd Dumbill <edd@usefulinc.com>
  1007. * updated the documentation
  1008. 1999-10-08 Edd Dumbill <edd@usefulinc.com>
  1009. * added system.* methods and dispatcher, plus documentation
  1010. * fixed bug which meant request::getNumParams was returning an
  1011. incorrect value
  1012. * added signatures into the dispatch map. This BREAKS
  1013. COMPATIBILITY with previous releases of this code
  1014. 1999-08-18 Edd Dumbill <edd@usefulinc.com>
  1015. * made entity encoding and decoding transparent now on string
  1016. passing.
  1017. * de-globalised the globals in the parse routines, using an
  1018. associative array to hold all parser state $_xh
  1019. * changed default input encoding to be UTF-8 to match expectation
  1020. * separated out parseResponse into parseResponse and
  1021. parseResponseFile so that you can call parseResponse on a string
  1022. if you have one handy
  1023. 1999-07-20 Edd Dumbill <edd@usefulinc.com>
  1024. * Moved documentation into Docbook format
  1025. 1999-07-19 Edd Dumbill <edd@usefulinc.com>
  1026. * Added an echo server into server.php and echotest.php, a client
  1027. which will exercise the new echo routine.
  1028. * Added test for no valid value returned: in this case will now
  1029. throw the error "invalid payload"
  1030. * Added serialize() method to xmlrpcresp to return a string with
  1031. the response serialized as XML
  1032. * Added automatic encoding and decoding for base64 types
  1033. * Added setDebug() method to client to enable HTML output
  1034. debugging in the client
  1035. 1999-07-08 Edd Dumbill <edd@usefulinc.com>
  1036. * Improved XML parse error reporting on the server side to send it
  1037. back in a faultCode packet. expat errors now begin at 100
  1038. 1999-07-07 Edd Dumbill <edd@usefulinc.com>
  1039. * Changed the structmem and arraymem methods of xmlrpcval to always
  1040. return xmlrpc vals whether they referred to scalars or complex
  1041. types.
  1042. * Added the server class and demonstrations
  1043. * Fixed bugs in the XML parsing and reworked it
  1044. $Id: ChangeLog,v 1.96 2009/03/16 19:39:11 ggiunta Exp $