* new: method `PhpXmlRpc::useInteropFaults()` can be used to make the library change the error codes it generates to
match the spec described at https://xmlrpc-epi.sourceforge.net/specs/rfc.fault_codes.php
+* new: both `Request` and `Response` acquired methods `getPayload` and `getContentType`
+
* new: method `Client::getUrl()`
* new: method `Server::setDispatchMap()`
$encodingHdr .
'Accept-Charset: ' . implode(',', $opts['accepted_charset_encodings']) . "\r\n" .
$cookieHeader .
- 'Content-Type: ' . $req->content_type . "\r\nContent-Length: " .
+ 'Content-Type: ' . $req->getContentType() . "\r\nContent-Length: " .
strlen($payload) . "\r\n\r\n" .
$payload;
}
}
// extra headers
- $headers = array('Content-Type: ' . $req->content_type, 'Accept-Charset: ' . implode(',', $opts['accepted_charset_encodings']));
+ $headers = array('Content-Type: ' . $req->getContentType(), 'Accept-Charset: ' . implode(',', $opts['accepted_charset_encodings']));
// if no keepalive is wanted, let the server know it in advance
if (!$opts['keepalive']) {
$headers[] = 'Connection: close';
// if we get a warning/error that has output some text before here, then we cannot
// add a new header. We cannot say we are sending xml, either...
if (!headers_sent()) {
- header('Content-Type: ' . $resp->content_type);
+ header('Content-Type: ' . $resp->getContentType());
// we do not know if client actually told us an accepted charset, but if it did we have to tell it what we did
header("Vary: Accept-Charset");
{
return $this->payload;
}
+
+ /**
+ * @return string
+ */
+ public function getContentType()
+ {
+ return $this->content_type;
+ }
}