Skip to content
Snippets Groups Projects
Commit 28246206 authored by Stephan Jorek's avatar Stephan Jorek Committed by Wouter Wolters
Browse files

[BUGFIX] fix spelling of content-type http-header in response classes

In the constructors of the two new http-response classes ...

* TYPO3\CMS\Core\Http\HtmlResponse
* TYPO3\CMS\Core\Http\JsonResponse

... change the spelling of the value of the lowercased header-names
for the default/fallback 'Content-Type' header from 'Content-type'
to 'Content-Type'. Mind the capital 'T' in '...-Type'.

Resolves: #82537
Releases: master
Change-Id: Ib7b3d0f6c6de0a1490345e9e537d3545b80b4d82
Reviewed-on: https://review.typo3.org/54200


Reviewed-by: default avatarBenni Mack <benni@typo3.org>
Tested-by: default avatarBenni Mack <benni@typo3.org>
Reviewed-by: default avatarWouter Wolters <typo3@wouterwolters.nl>
Tested-by: default avatarWouter Wolters <typo3@wouterwolters.nl>
parent 2a6690b9
Branches
Tags
No related merge requests found
......@@ -40,7 +40,7 @@ class HtmlResponse extends Response
// Ensure that text/html header is set, if Content-Type was not set before
if (!$this->hasHeader('Content-Type')) {
$this->headers['Content-Type'][] = 'text/html; charset=utf-8';
$this->lowercasedHeaderNames['content-type'] = 'Content-type';
$this->lowercasedHeaderNames['content-type'] = 'Content-Type';
}
}
}
......@@ -67,7 +67,7 @@ class JsonResponse extends Response
// Ensure that application/json header is set, if Content-Type was not set before
if (!$this->hasHeader('Content-Type')) {
$this->headers['Content-Type'][] = 'application/json; charset=utf-8';
$this->lowercasedHeaderNames['content-type'] = 'Content-type';
$this->lowercasedHeaderNames['content-type'] = 'Content-Type';
}
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment