Bug #82537
closedMinor typo in default Content-Type HTTP-header of TYPO3\CMS\Core\Http\HtmlResponse and TYPO3\CMS\Core\Http\JsonResponse
100%
Description
Hi folks,
there is a case-related typo in the following two files:
TYPO3\CMS\Core\Http\HtmlResponse
TYPO3\CMS\Core\Http\JsonResponse
In both files it's the same mistake - see my embedded comment starting with # <---
:
// 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'; # <--- It must be 'Content-Type' with capital 'T' in the trailing 'Type'
}
This has been verified by me for commit 2a6690b94982de4b07e7130865096c0136e7110a.
Files
Updated by Stephan Jorek about 7 years ago
Besides the attached patch I already prepared a branch under https://github.com/sjorek/TYPO3.CMS/tree/bugfix-82537-for-content-type-http-header-typo-in-html-and-json-response-classes that is ready to be pulled. If you want to I could issue a pull-request …
Cheers,
Stephan
Updated by Gerrit Code Review about 7 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54200
Updated by Stephan Jorek about 7 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 28246206d34f84b9627adff38a6c24e10b608aad.