Skip to content

Commit 1ee8703

Browse files
author
Igor Melnikov
committed
MAGETWO-51847: 400 Bad request error when Magento clears Varnish cache on GoDaddy
Fixing static test
1 parent 4a3e7d3 commit 1ee8703

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

app/code/Magento/PageCache/Model/Cache/Server.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,20 +62,20 @@ public function getUris()
6262
foreach ($configuredHosts as $host) {
6363
$servers[] = UriFactory::factory('')
6464
->setHost($host['host'])
65-
->setPort(isset($host['port']) ? $host['port'] : self::DEFAULT_PORT)
66-
;
65+
->setPort(isset($host['port']) ? $host['port'] : self::DEFAULT_PORT);
6766
}
6867
} elseif ($this->request->getHttpHost()) {
69-
$servers[] = UriFactory::factory('')->setHost($this->request->getHttpHost())->setPort(self::DEFAULT_PORT);
68+
$servers[] = UriFactory::factory('')
69+
->setHost($this->request->getHttpHost())
70+
->setPort(self::DEFAULT_PORT);
7071
} else {
7172
$servers[] = UriFactory::factory($this->urlBuilder->getUrl('*', ['_nosid' => true]));
7273
}
7374

74-
foreach ($servers as $key => $value) {
75+
foreach (array_keys($servers) as $key) {
7576
$servers[$key]->setScheme('http')
7677
->setPath('/')
77-
->setQuery(null)
78-
;
78+
->setQuery(null);
7979
}
8080
return $servers;
8181
}

app/code/Magento/PageCache/Test/Unit/Model/Cache/ServerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public function testGetUris(
8181
}
8282
}
8383

84-
foreach ($uris as $key => $value) {
84+
foreach (array_keys($uris) as $key) {
8585
$uris[$key]->setScheme('http')
8686
->setPath('/')
8787
->setQuery(null);

0 commit comments

Comments
 (0)