Merge pull request #3778 from tomking2/2.4

Fixes Issue #3633 - Returned XML has application/json Content-Type header
pull/3785/head
Andras Iklody 2018-10-19 14:46:42 +02:00 committed by GitHub
commit 04fe1c0cf6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -342,7 +342,7 @@ class RestResponseComponent extends Component
private function __sendResponse($response, $code, $format = false, $raw = false, $download = false)
{
if (strtolower($format) === 'application/xml') {
if (strtolower($format) === 'application/xml' || strtolower($format) === 'xml') {
if (!$raw) {
if (isset($response[0])) {
if (count(array_keys($response[0])) == 1) {