Skip to content

Commit edef71c

Browse files
committed
setCookie: don't add domain to cookie
unless explicitly specified. Browsers fail with singlepart domain names, e.g. localhost
1 parent 0cbb034 commit edef71c

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)