Skip to content

Commit

Permalink
MAGETWO-84006: Fix robots.txt content type to 'text/plain' magento#12310
Browse files Browse the repository at this point in the history
  • Loading branch information
ishakhsuvarov authored Nov 18, 2017
2 parents e03892c + 9e13988 commit 2c3cd64
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 2c3cd64

Please sign in to comment.