fixes in phpdoc, added support for different content-type headers than default, defaulted it to text/xml