diff --git a/core/lib/Drupal/Core/Render/HtmlResponseAttachmentsProcessor.php b/core/lib/Drupal/Core/Render/HtmlResponseAttachmentsProcessor.php index 5d189af..d6392e4 100644 --- a/core/lib/Drupal/Core/Render/HtmlResponseAttachmentsProcessor.php +++ b/core/lib/Drupal/Core/Render/HtmlResponseAttachmentsProcessor.php @@ -270,13 +270,14 @@ protected function setHeaders(HtmlResponse $response, array $headers) { // Drupal treats the HTTP response status code like a header, even though // it really is not. if (strtolower($name) === 'status') { - list ($code, $message) = explode(' ', $value, 2); - $response->setStatusCode($code, $message); + $response->setStatusCode($value); + } + else { + $response->headers->set($name, $value, $replace); } - $response->headers->set($name, $value, $replace); } } - + /** * Ensure proper key/data order and defaults for renderable head items. * @@ -356,16 +357,13 @@ protected function processHtmlHeadLink(array $html_head_link) { * another 'html_head_link' array. */ protected function processFeed($attached_feed) { - // @todo: Determine if feed is supposed to be a single structure or an - // array of structures, and then refactor this array manipulation into - // a separate method if needed. $html_head_link = []; foreach($attached_feed as $item) { $feed_link = [ - 'rel' => 'alternate', - 'type' => 'application/rss+xml', 'href' => $item[0], + 'rel' => 'alternate', 'title' => empty($attached_feed[1]) ? '' : $item[1], + 'type' => 'application/rss+xml', ]; $html_head_link[] = [$feed_link, FALSE]; } diff --git a/core/modules/aggregator/src/Controller/AggregatorController.php b/core/modules/aggregator/src/Controller/AggregatorController.php index 398da98..13ff3d9 100644 --- a/core/modules/aggregator/src/Controller/AggregatorController.php +++ b/core/modules/aggregator/src/Controller/AggregatorController.php @@ -174,7 +174,6 @@ public function pageLast() { $items = $this->entityManager()->getStorage('aggregator_item')->loadAll(20); $build = $this->buildPageList($items); $build['#attached']['feed'][] = array('aggregator/rss', $this->config('system.site')->get('name') . ' ' . $this->t('aggregator')); - error_log(print_r($build, TRUE)); return $build; } diff --git a/core/modules/system/tests/modules/httpkernel_test/httpkernel_test.routing.yml b/core/modules/system/tests/modules/httpkernel_test/httpkernel_test.routing.yml index 8f5762a..7de4338 100644 --- a/core/modules/system/tests/modules/httpkernel_test/httpkernel_test.routing.yml +++ b/core/modules/system/tests/modules/httpkernel_test/httpkernel_test.routing.yml @@ -4,9 +4,3 @@ httpkernel_test.empty: _controller: '\Drupal\httpkernel_test\Controller\TestController::get' requirements: _access: 'TRUE' -httpkernel_test.teapot: - path: '/httpkernel-test/teapot' - defaults: - _controller: '\Drupal\httpkernel_test\Controller\TestController::teapot' - requirements: - _access: 'TRUE'