diff options
author | Andreas Gohr <andi@splitbrain.org> | 2013-02-16 18:29:20 +0100 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2013-02-16 18:29:20 +0100 |
commit | 9d2e1be699d573eebda922cf67f030d3d2aa462d (patch) | |
tree | 51448d2e7e695f127533c9aa3cb438d7184f89bd /lib/exe/xmlrpc.php | |
parent | 7e9efe5266f592dc927dbf126a901e7dea2b4f5d (diff) | |
download | rpg-9d2e1be699d573eebda922cf67f030d3d2aa462d.tar.gz rpg-9d2e1be699d573eebda922cf67f030d3d2aa462d.tar.bz2 |
introduced http_status() for sending HTTP status code FS#1698
It seems, some servers require a special Status: header for sending the
HTTP status code from PHP (F)CGI to the server. This patch introduces a
new function (adopted from CodeIgniter) for simplifying the status
handling.
Diffstat (limited to 'lib/exe/xmlrpc.php')
-rw-r--r-- | lib/exe/xmlrpc.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/exe/xmlrpc.php b/lib/exe/xmlrpc.php index 5e6c197d0..c09daa17c 100644 --- a/lib/exe/xmlrpc.php +++ b/lib/exe/xmlrpc.php @@ -29,10 +29,10 @@ class dokuwiki_xmlrpc_server extends IXR_Server { return $result; } catch (RemoteAccessDeniedException $e) { if (!isset($_SERVER['REMOTE_USER'])) { - header('HTTP/1.1 401 Unauthorized'); + http_status(401); return new IXR_Error(-32603, "server error. not authorized to call method $methodname"); } else { - header('HTTP/1.1 403 Forbidden'); + http_status(403); return new IXR_Error(-32604, "server error. forbidden to call the method $methodname"); } } catch (RemoteException $e) { |