$envelope->appendChild($body);
$dom->appendChild($envelope);
- // Send headers.
- $this->send_headers();
-
- // Output the XML.
- echo $dom->saveXML();
+ $this->response = $dom->saveXML();
+ $this->send_response();
}
/**
header('Expires: ' . gmdate('D, d M Y H:i:s', 0) . ' GMT');
header('Pragma: no-cache');
header('Accept-Ranges: none');
- header('Content-Length: ' . count($this->response));
+ header('Content-Length: ' . strlen($this->response));
header('Content-Type: application/xml; charset=utf-8');
header('Content-Disposition: inline; filename="response.xml"');
}