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