From ecbc401584b51840cb85be75a5403b7386f5eae4 Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Sun, 11 Nov 2018 15:01:44 -0700 Subject: [PATCH] Revert "Set template type based on request headers `content-type` if set" This reverts commit 005f626b886e1fbde24a00a286cf8a05280e0bf3. # Conflicts: # CHANGELOG.md # system/src/Grav/Common/Page/Page.php --- CHANGELOG.md | 1 - system/src/Grav/Common/Page/Page.php | 5 +---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a23a790b..396d4fd71 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,6 @@ 1. [](#improved) * Allow custom Flex form views * Cleaned up and sorted the Service `idMap` - * Allow request headers `Content-Type` to set the template type [form#221](https://github.com/getgrav/grav-plugin-form/issues/221) 1. [](#bugfix) * Fixed `Uri::hasStandardPort()` to support reverse proxy configurations [#1786](https://github.com/getgrav/grav/issues/1786) * Use `append_url_extension` from page header to set template format if set [#2604](https://github.com/getgrav/grav/pull/2064) diff --git a/system/src/Grav/Common/Page/Page.php b/system/src/Grav/Common/Page/Page.php index 5fd7db083..6b245450f 100644 --- a/system/src/Grav/Common/Page/Page.php +++ b/system/src/Grav/Common/Page/Page.php @@ -1292,10 +1292,7 @@ class Page implements PageInterface } if (empty($this->template_format)) { - $content_type = Grav::instance()['uri']->getContentType(true); - $fallback_type = Utils::getExtensionByMime($content_type); - $default = is_null($content_type) ? Grav::instance()['uri']->extension('html') : $fallback_type; - $this->template_format = $default; + $this->template_format = Grav::instance()['uri']->extension('html'); } return $this->template_format;