[TASK] Fix spelling of Content-Type headers 10/49410/3
authorMichael Stucki <michael.stucki@typo3.org>
Sat, 6 Aug 2016 23:56:20 +0000 (01:56 +0200)
committerMorton Jonuschat <m.jonuschat@mojocode.de>
Sun, 7 Aug 2016 11:57:14 +0000 (13:57 +0200)
Change-Id: Ib1f7da190c86bafaab7bdfe40975ba0713b541fd
Resolves: #77427
Releases: master
Reviewed-on: https://review.typo3.org/49410
Tested-by: Bamboo TYPO3com <info@typo3.com>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Tested-by: Morton Jonuschat <m.jonuschat@mojocode.de>
typo3/sysext/backend/Classes/Http/AjaxRequestHandler.php
typo3/sysext/core/Classes/Core/SystemEnvironmentBuilder.php
typo3/sysext/core/Classes/Http/AjaxRequestHandler.php
typo3/sysext/core/Classes/Utility/GeneralUtility.php
typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Configuration/TypoScript/setup.txt
typo3/sysext/fluid/ext_typoscript_setup.txt
typo3/sysext/install/Resources/Private/Partials/Action/Common/Headers.html
typo3/sysext/t3editor/Resources/Private/tsref.xml

index 21035a4..e3c3cbe 100644 (file)
@@ -157,7 +157,7 @@ class AjaxRequestHandler implements RequestHandlerInterface
     {
         /** @var Response $response */
         $response = GeneralUtility::makeInstance(Response::class, 'php://temp', 200, [
-            'Content-type' => 'application/json; charset=utf-8',
+            'Content-Type' => 'application/json; charset=utf-8',
             'X-JSON' => 'true'
         ]);
 
index dbe2075..b47bcbf 100644 (file)
@@ -404,7 +404,7 @@ class SystemEnvironmentBuilder
     {
         $headers = [
             \TYPO3\CMS\Core\Utility\HttpUtility::HTTP_STATUS_500,
-            'Content-type: text/plain'
+            'Content-Type: text/plain'
         ];
         if (!headers_sent()) {
             foreach ($headers as $header) {
index f4cfb49..9f00478 100644 (file)
@@ -217,7 +217,7 @@ class AjaxRequestHandler
         $response = GeneralUtility::makeInstance(Response::class);
         $response = $response
             ->withStatus(500, ' (AJAX)')
-            ->withHeader('Content-type', 'text/xml; charset=utf-8')
+            ->withHeader('Content-Type', 'text/xml; charset=utf-8')
             ->withHeader('X-JSON', 'false');
 
         $response->getBody()->write('<t3err>' . htmlspecialchars($this->errorMessage) . '</t3err>');
@@ -236,7 +236,7 @@ class AjaxRequestHandler
         /** @var Response $response */
         $response = GeneralUtility::makeInstance(Response::class);
         $response = $response
-            ->withHeader('Content-type', 'text/html; charset=utf-8')
+            ->withHeader('Content-Type', 'text/html; charset=utf-8')
             ->withHeader('X-JSON', 'true');
 
         $response->getBody()->write(implode('', $this->content));
@@ -255,7 +255,7 @@ class AjaxRequestHandler
         /** @var Response $response */
         $response = GeneralUtility::makeInstance(Response::class);
         $response = $response
-            ->withHeader('Content-type', 'text/xml; charset=utf-8')
+            ->withHeader('Content-Type', 'text/xml; charset=utf-8')
             ->withHeader('X-JSON', 'true');
 
         $response->getBody()->write(implode('', $this->content));
@@ -279,7 +279,7 @@ class AjaxRequestHandler
     {
         /** @var Response $response */
         $response = GeneralUtility::makeInstance(Response::class);
-        $response = $response->withHeader('Content-type', 'application/json; charset=utf-8');
+        $response = $response->withHeader('Content-Type', 'application/json; charset=utf-8');
 
         $content = json_encode($this->content);
         // Bring content in xhr.responseText except when in "json head only" mode
@@ -302,7 +302,7 @@ class AjaxRequestHandler
     protected function renderAsJavascript()
     {
         $response = GeneralUtility::makeInstance(Response::class);
-        $response = $response->withHeader('Content-type', 'text/html; charset=utf-8');
+        $response = $response->withHeader('Content-Type', 'text/html; charset=utf-8');
         $response->getBody()->write(str_replace('|', json_encode($this->content), $this->javascriptCallbackWrap));
         return $response;
     }
index ff731e0..d0172bf 100644 (file)
@@ -2076,7 +2076,7 @@ class GeneralUtility
                 $report['lib'] = 'http';
                 if ($response->getStatusCode() >= 300 && $response->getStatusCode() < 400) {
                     $report['http_code'] = $response->getStatusCode();
-                    $report['content_type'] = $response->getHeader('Content-type');
+                    $report['content_type'] = $response->getHeader('Content-Type');
                     $report['error'] = $response->getStatusCode();
                     $report['message'] = $response->getReasonPhrase();
                 } elseif (!empty($content)) {
@@ -2085,7 +2085,7 @@ class GeneralUtility
                 } elseif ($includeHeader) {
                     // Set only for $includeHeader to work exactly like PHP variant
                     $report['http_code'] = $response->getStatusCode();
-                    $report['content_type'] = $response->getHeader('Content-type');
+                    $report['content_type'] = $response->getHeader('Content-Type');
                 }
             }
         } else {
index 2716b1a..5694579 100644 (file)
@@ -56,7 +56,7 @@ tx_blogexample_plaintext {
                admPanel = 0
                no_cache = 1
                disableAllHeaderCode = 1
-               additionalHeaders = Content-type:text/plain
+               additionalHeaders = Content-Type: text/plain
                defaultGetVars {
                        tx_blogexample_postlist.format = txt
                }
index 25dbb0a..d007b2b 100644 (file)
@@ -6,7 +6,7 @@ fluidAjaxWidgetResponse {
        config {
                no_cache = 1
                disableAllHeaderCode = 1
-               additionalHeaders = Content-type:text/plain
+               additionalHeaders = Content-Type: text/plain
                debug = 0
        }
        10 = USER_INT
index 7d0b8bc..c84649d 100644 (file)
@@ -1,5 +1,5 @@
 <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
-<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
 <link rel="stylesheet" type="text/css" href="../Resources/Public/Css/install.css?{time}" />
 <link rel="icon" type="image/vnd.microsoft.icon" href="../Resources/Public/Icons/favicon.ico?{time}" />
 <script type="text/javascript" src="../../core/Resources/Public/JavaScript/Contrib/jquery/jquery-2.2.3.min.js?{time}"></script>
index 8e3e2ce..72fc077 100644 (file)
@@ -212,10 +212,10 @@ Note: If you're working on a server where you have both internal and external ac
       This is additional headers. You separate each header by a vertical line "|". ┬áNormally TYPO3 does not send any headers with the Header()-function in PHP.
 
 Examples:
-Content-type: text/vnd.wap.wml
+Content-Type: text/vnd.wap.wml
 (this will sent a content-header for a WAP-site)
 
-Content-type: image/gif | Expires: Mon, 26 Jul 1997 05:00:00 GMT
+Content-Type: image/gif | Expires: Mon, 26 Jul 1997 05:00:00 GMT
 (this will sent a content-header for a GIF-file and a Expires header)
 
 Location: www.typo3.org
@@ -332,7 +332,7 @@ Use this feature in templates supplying other content-types than HTML. That coul
                        <default><![CDATA[false]]></default>
                </property>
                <property name="disableCharsetHeader" type="boolean">
-                       <description><![CDATA[By default a HTTP header "content-type:text/html; charset..." is sent. This option will disable that.]]></description>
+                       <description><![CDATA[By default a HTTP header "Content-Type: text/html; charset..." is sent. This option will disable that.]]></description>
                        <default><![CDATA[
 ]]></default>
                </property>