Skip to content

Commit 9ee5410

Browse files
authored
Merge pull request #10 from Codeception/fix-set-cookie
setCookie: don't add domain to cookie unless explicitly specified.
2 parents 0cbb034 + edef71c commit 9ee5410

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/Codeception/Module/WebDriver.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -840,12 +840,7 @@ public function setCookie($cookie, $value, array $params = [], $showDebug = true
840840
if (isset($params['expires'])) { // PhpBrowser compatibility
841841
$params['expiry'] = $params['expires'];
842842
}
843-
if (!isset($params['domain'])) {
844-
$urlParts = parse_url($this->config['url']);
845-
if (isset($urlParts['host'])) {
846-
$params['domain'] = $urlParts['host'];
847-
}
848-
}
843+
849844
// #5401 Supply defaults, otherwise chromedriver 2.46 complains.
850845
$defaults = [
851846
'path' => '/',

0 commit comments

Comments
 (0)