Skip to content

Commit 8d48fd3

Browse files
⏫ Forwardport of #12310 to 2.3-develop branch
Applied pull request patch https://github.com/magento/magento2/pull/12310.patch (created by @tufahu) based on commit(s): 1. 8fc99b1 2. 36dfdca 3. 5c02402 4. 2eada9c 5. e9986c5
1 parent 8e77e2f commit 8d48fd3

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

app/code/Magento/Robots/Controller/Index/Index.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ public function execute()
4343
/** @var Page $resultPage */
4444
$resultPage = $this->resultPageFactory->create(true);
4545
$resultPage->addHandle('robots_index_index');
46+
$resultPage->setHeader('Content-Type', 'text/plain');
4647
return $resultPage;
4748
}
4849
}

app/code/Magento/Robots/Test/Unit/Controller/Index/IndexTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ public function testExecute()
5151
$resultPageMock->expects($this->once())
5252
->method('addHandle')
5353
->with('robots_index_index');
54+
$resultPageMock->expects($this->once())
55+
->method('setHeader')
56+
->with('Content-Type', 'text/plain');
5457

5558
$this->resultPageFactory->expects($this->any())
5659
->method('create')

0 commit comments

Comments
 (0)