summaryrefslogtreecommitdiff
path: root/inc/IXR_Library.php
diff options
context:
space:
mode:
authorMichael Hamann <michael@content-space.de>2011-01-15 12:18:09 +0100
committerMichael Hamann <michael@content-space.de>2011-01-15 12:29:02 +0100
commit278a5eb294b2df859c7eb20c6e35e32280a8b613 (patch)
tree662e63d2668ac09009ea0321f0f1619029e47b26 /inc/IXR_Library.php
parentb2665af72cdba76ca409b7e00e150746f2f83ced (diff)
downloadrpg-278a5eb294b2df859c7eb20c6e35e32280a8b613.tar.gz
rpg-278a5eb294b2df859c7eb20c6e35e32280a8b613.tar.bz2
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.
Diffstat (limited to 'inc/IXR_Library.php')
-rw-r--r--inc/IXR_Library.php9
1 files changed, 2 insertions, 7 deletions
diff --git a/inc/IXR_Library.php b/inc/IXR_Library.php
index c7f83a6d6..c8255e6d9 100644
--- a/inc/IXR_Library.php
+++ b/inc/IXR_Library.php
@@ -395,13 +395,8 @@ EOD;
$this->output($error->getXml());
}
function output($xml) {
- $xml = '<?xml version="1.0"?>'."\n".$xml;
- $length = strlen($xml);
- header('Connection: close');
- header('Content-Length: '.$length);
- header('Content-Type: text/xml');
- header('Date: '.date('r'));
- echo $xml;
+ header('Content-Type: text/xml; charset=utf-8');
+ echo '<?xml version="1.0"?>', "\n", $xml;
exit;
}
function hasMethod($method) {