Commit Graph

40 Commits

Author SHA1 Message Date
Mark Janssen 2c849d6c3a Fix #2883 2019-10-17 06:26:20 +02:00
Mark Janssen fe52a7ca92 Add failing unit test for #2883 2019-10-17 06:25:22 +02:00
Michael Große 5a8d6e48ea
Rename HTTPClient namespace to HTTP
This should make namespace a bit more flexible in scope and allow us to
move more functionality there later.
2019-03-26 22:05:09 +01:00
Michael Große 198564ab36
Refactor HTTPClient into different files 2019-03-17 13:36:40 +01:00
Gerrit Uitslag 47ab76cc8e undefined var 2015-06-30 23:55:22 +02:00
Gerrit Uitslag 4d1366e45c Use a DateTime object in the IXR_Date 2015-06-30 23:55:08 +02:00
Christopher Smith 26e22ab837 Changes for PHP 7 Compatibility
- replace PHP4 style class constructor function names (based on
  class name) with php 5 __construct()
Also remove some '&' reference operators used with objects
And add some object type hints
2015-05-15 19:03:34 +02:00
Gerrit Uitslag 0a8880f674 Update IXR lib from 1.61 to 1.7.4 + WP improvements
Update to latest Incutio XML-RPC Library
include also some Wordpress improvements
(see for more details the log of the lib as included in WP:
https://core.trac.wordpress.org/log/trunk/src/wp-includes/class-IXR.php )
2014-10-03 00:46:37 +02:00
Gerrit Uitslag a6eab1402c Reformatting IXR library 2014-10-02 15:06:45 +02:00
Gerrit Uitslag 67b5a1455c PHPDocs 2014-10-02 14:55:56 +02:00
Gerrit Uitslag 42ea7f447f Many PHPDocs, some unused and dyn declared vars
many PHPDocs
some unused variables
some dynamically declared variables declared
2014-10-01 11:30:27 +02:00
Gerrit Uitslag 59bc3b48fd more scrutinizer issue improvements 2014-09-29 21:45:27 +02:00
Tim Roes 586bfa91f2 Changed an error code in XML-RPC interface.
This error hasn't anything to do with the rest of the -32600 errors.
2012-04-04 21:49:26 +02:00
Andreas Gohr a2b7fdb8e1 Merge branch 'master' of https://github.com/dom-mel/dokuwiki into pull-request-87
* 'master' of https://github.com/dom-mel/dokuwiki: (38 commits)
  removed requires, changed conf check in xmlrpc.php
  removed require_once for autoloaded fulltext.php
  updated comment
  added dokuwiki.getXMLRPCAPIVersion and wiki.getRPCVersionSupported
  added RPC_CALL_ADD event.
  replaced $HTTP_RAW_POST_DATA with http_get_raw_post_data function
  changed error code for unauthorized method calls.
  typo fixes
  moved plugin and core method calls to seperate function
  corrected comment
  added getapi methods to remote plugin
  removed unused class
  fixed testcase
  refactored RemoteAccessDenied to RemoteAccessDeniedException
  adjusted test cases
  delegate file and date transformation to remote library
  treat null as empty array
  added missing getTime
  added missing getVersion
  set login as public method
  ...
2012-03-23 10:02:01 +01:00
Andreas Gohr 7518cd81d6 use correct call to parent constructor in IXR lib 2012-03-23 08:17:24 +01:00
Dominik Eckelmann 96946cc94d replaced $HTTP_RAW_POST_DATA with http_get_raw_post_data function 2012-03-21 11:25:00 +01:00
Michael Hamann 278a5eb294 Remove superfluous headers, fix XML-RPC with gzip enabled
This removes headers that are sent by PHP/the webserver anyway as they
are possibly wrong as e.g. when gzip compression is enabled in
inc/init.php (which does happen when the client supports gzip) the
content size is smaller than the one that was specified by the
content-length header and thus e.g. the Python XML-RPC client fails with
an error message because of the size mismatch. Additionally the content
encoding is now set to utf-8 in the http headers.
2011-01-15 12:29:02 +01:00
Andreas Gohr 8a52cdf35a XML-RPC fix for untyped string values FS#1993
includes unit tests. Extensions welcome.
2010-07-01 19:44:41 +02:00
Andreas Gohr 5ab78106b0 Make XMLRPC date parsing more flexible FS#1966
Since the specs aren't 100% clear, dates might be passed in different
formats by various XMLRPC clients. This patch makes date parsing a bit
more flexible.

Unit tests included.
2010-06-09 21:43:10 +02:00
Dominik Eckelmann ccee784246 Changed date format to the xmlrpc spec date format 2010-06-09 21:19:06 +02:00
Dominik Eckelmann eb2cef78be bugfix empty strings in untyped value tag.
according to the specs a value without a type is
recognised as string. This patch handles empty value
tags the right way as empty String.
2010-06-08 21:27:27 +02:00
Andreas Gohr cf5b435169 Replace vertical tabs befor parsing XML in XMLRPC
It seems that the 0x0B Vertical Tab character breaks the PHP
XML parser. This workaround replaces the char with a space
before parsing. Not ideal but good enough for now.
2010-03-22 23:43:15 +01:00
Andreas Gohr 0af14a6e25 removed more unneeded require_once() calls 2010-02-01 15:38:41 +01:00
Andreas Gohr 49eb6e3806 some more coding standard compliance updates 2010-01-15 19:50:13 +01:00
Andreas Gohr 56523eec50 do not trim XMLRPC values FS#1824
Ignore-this: f43d3f070cfae4040e0e70648d0e541a
The XMLRPC backend will not trim whitespaces or newlines from string values
anymore.

darcs-hash:20091219151652-7ad00-94d6cb26ff6396e09f107cf09dccb5423680c5c9.gz
2009-12-19 16:16:52 +01:00
Andreas Gohr 6fcceb42ba fixed possible problem in XMLRPC when no arguments are passed
Ignore-this: e422f7ffed22302c153bba0d7227b6e0

darcs-hash:20091211125537-7ad00-365862547d10c83af000b4ef0fb3f0d632d7ffea.gz
2009-12-11 13:55:37 +01:00
furun 47583ff042 Whitespace cleanup FS#1709
Ignore-this: 27ea52110bce929b2c61ed8faba67cfc

darcs-hash:20091016205526-c0bf4-35eba4e65d37980a667ba982f7f1ea5b7b07f01c.gz
2009-10-16 22:55:26 +02:00
Mikhail I. Izmestev ce12fb7aa3 bugfix for IXR_Date::parseIso()
Ignore-this: e8d6e4b7eade8bd2898ada53cd9cf0dd

darcs-hash:20090312223053-556be-bab8017750e73beb806ca3c22e0f509d58acf19a.gz
2009-03-12 23:30:53 +01:00
Andreas Gohr 926d4c4ee8 Check HTTP response code in XMLRPC client
darcs-hash:20090303193527-7ad00-82bb49362732ec221c7cdab41050d402ea125938.gz
2009-03-03 20:35:27 +01:00
michael 90b4c62db7 Replaced date-functions by their utc-quivalent in the XML-RPC library.
Ignore-this: e74f051d409c2df9e59f6f0b42f362f8
According to the specification of the wiki XML-RPC api at
http://www.jspwiki.org/wiki/WikiRPCInterface2 all returned datetimes
should be UTC. This commit changes the date-functions in IXR_Date to
make DokuWiki obey to this specification (otherwise there is now way
to get from these datetimes back to a timestamp for example).

darcs-hash:20090227223344-074e0-91382e67b18e6e1fa3b6d9311adbc1898fb73a01.gz
2009-02-27 23:33:44 +01:00
Andreas Gohr 7558821bb6 fixed error reporting in XMLRPC client
Ignore-this: 4d1b83deb38aa6192cfe53cecdc6b6f6

darcs-hash:20090221125206-7ad00-44d6a3c5a11d6042c2fc6e41bd7f309a382a55dc.gz
2009-02-21 13:52:06 +01:00
michael 8285d596bc Workaround for a PHP/libxml-bug with entities
As described on http://bugs.php.net/bug.php?idE996, current versions of libxml (2.7.0/1) lead to the fact that the xml parser of PHP eats predefined entities. As proposed on http://bugs.simplepie.org/issues/show/101 predefined entities are replaced by their numeric equivalents. There is no condition in this patch as there are people reporting it isn't gone in 2.7.2, i can confirm that, and furthermore here PHP is reporting libxml 20632 and the bug exists, too (it is linked to libxml2 though which has version 2.7.2). As soon as there is definite knowledge on which versions are actually concerned and how to detect them in PHP a condition should be added as this patch might decrease the performance of the affected functions.

darcs-hash:20081229213341-074e0-10e0cca836c6599efe4d3dfd45f512d624d0a808.gz
2008-12-29 22:33:41 +01:00
Michael Klier bb32615dd0 XMLRPC: new event XMLRPC_CALLBACK_REGISTER
By using this event, action plugins can register their own callback methods
	in DokuWikis XML-RPC server, and extend it's functionality. The event data
	is the server instance. Plugins can also remove already registered
	callbacks or replace them with their own methods.

darcs-hash:20080824080457-23886-b49b897592ce6717f0980f6044bae2d51fd73336.gz
2008-08-24 10:04:57 +02:00
Gina Haeussge 354bc9918a XMLRPC requests are to be made using POST according to spec
darcs-hash:20080405214737-2b4f5-01801b89e5efb32fb56b63a6746b60223ee270ba.gz
2008-04-05 23:47:37 +02:00
Gina Haeussge 9edcadf635 XMLRPC client needs to call constructor of parent class
darcs-hash:20080405214710-2b4f5-42e138c2fb2c272ea99f1054065b35f840d6fcd4.gz
2008-04-05 23:47:10 +02:00
Gina Haeussge c8d9883504 Fix of invalid reference to request headers in XMLRPC client
darcs-hash:20080405112253-2b4f5-e69a8765cff9cc4b0373afca236488f8a2eb2751.gz
2008-04-05 13:22:53 +02:00
Michael Klier 5cc966ca51 XMLRPC: fix for IXR_Date which returned a wrong formatted UTC timestamp
darcs-hash:20080305193802-23886-b786952c122c36e63676dd82d771494d763b9569.gz
2008-03-05 20:38:02 +01:00
Andreas Gohr 059c03b9d7 use DokuHTTPClient in XMLRPC library
The code should work but is completely untested because it is currently not used.

darcs-hash:20080227215408-7ad00-952ebba433991bde0c4282beeb4887c637eb25aa.gz
2008-02-27 22:54:08 +01:00
Dennis Ploeger 3a1dad2d15 xmlrpc_putpage
Adds the putpage-method to the xmlrpc-server-code

darcs-hash:20071012135930-b8925-1d770de41b3e6aea4c612666194e915dda344647.gz
2007-10-12 15:59:30 +02:00
Andreas Gohr 797c0d1185 experimental XMLRPC support
This adds experimental XMLRPC support to DokuWiki. A subset of the
Wiki XMLRPC API v2 [1] is implemented.

You need to remove the die() call in lib/exe/xmlrpc.php to use it.

[1] http://www.jspwiki.org/wiki/WikiRPCInterface2

darcs-hash:20061124232744-7ad00-fdaccc68787c3b0349b155a94a1a56003560c5d8.gz
2006-11-25 00:27:44 +01:00