diff --git a/app/provision/index.php b/app/provision/index.php index 0cfdcd4bcf..db34119c5e 100644 --- a/app/provision/index.php +++ b/app/provision/index.php @@ -465,15 +465,14 @@ header("Content-Length: ".strlen($file_contents)); } else { - $result = simplexml_load_string ($file_contents, 'SimpleXmlElement', LIBXML_NOERROR+LIBXML_ERR_FATAL+LIBXML_ERR_NONE); - if (false == $result) { - header("Content-Type: text/plain"); - header("Content-Length: ".strval(strlen($file_contents))); - } - else { + if (is_xml($file_contents)) { header("Content-Type: text/xml; charset=utf-8"); header("Content-Length: ".strlen($file_contents)); } + else { + header("Content-Type: text/plain"); + header("Content-Length: ".strval(strlen($file_contents))); + } } } echo $file_contents;