Skip to content

Commit

Permalink
[BrowserKit] changed Cookie::fromString() to not take the secure sett…
Browse files Browse the repository at this point in the history
…ing into account if the URL is not present or is not HTTPS
  • Loading branch information
fabpot committed Jul 22, 2011
1 parent 4b1f133 commit d7c6de8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Cookie.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,11 @@ static public function fromString($cookie, $url = null)
$part = trim($part);

if ('secure' === strtolower($part)) {
// Ignore the secure flag if the original URI is not given or is not HTTPS
if (!$url || !isset($urlParts['scheme']) || 'https' != $urlParts['scheme']) {
continue;
}

$values['secure'] = true;

continue;
Expand Down

0 comments on commit d7c6de8

Please sign in to comment.