Skip to content

Commit

Permalink
Backport of MAGETWO-84006 for Magento 2.1: Fix robots.txt content typ…
Browse files Browse the repository at this point in the history
…e to 'text/plain' magento#12310

(cherry picked from commit 2c3cd64)
  • Loading branch information
ishakhsuvarov authored and hostep committed Feb 7, 2018
1 parent 918dd05 commit 0553ebc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/code/Magento/Robots/Controller/Index/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public function execute()
/** @var Page $resultPage */
$resultPage = $this->resultPageFactory->create(true);
$resultPage->addHandle('robots_index_index');
$resultPage->setHeader('Content-Type', 'text/plain');
return $resultPage;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ public function testExecute()
$resultPageMock->expects($this->once())
->method('addHandle')
->with('robots_index_index');
$resultPageMock->expects($this->once())
->method('setHeader')
->with('Content-Type', 'text/plain');

$this->resultPageFactory->expects($this->any())
->method('create')
Expand Down

0 comments on commit 0553ebc

Please sign in to comment.