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