Issue Bug Closed

#82537Minor typo in default Content-Type HTTP-header of TYPO3\CMS\Core\Http\HtmlResponse and TYPO3\CMS\Core\Http\JsonResponse

Stephan Jorek 09/21/17, 16:54 updated 10/02/18, 10:55

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.

Reviews 1