Project

General

Profile

Actions

Bug #82537

closed

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

Added by Stephan Jorek about 7 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
-
Target version:
-
Start date:
2017-09-21
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

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

Actions #1

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

Actions #2

Updated by Stephan Jorek about 7 years ago

  • Description updated (diff)
Actions #3

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

Actions #4

Updated by Stephan Jorek about 7 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #5

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF