Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Header::parse loosing cookies with same name #586

Open
hayden-t opened this issue Dec 11, 2023 · 0 comments
Open

Header::parse loosing cookies with same name #586

hayden-t opened this issue Dec 11, 2023 · 0 comments

Comments

@hayden-t
Copy link

hayden-t commented Dec 11, 2023

I believe im running guzzle 2.5.0 under PHP 8.1, which the parse function more or less looks identical to current master.

example (2 cookies set, one for / and the other /admin) both are sent in a GET even in strict mode

$cookiesHeader = $conn->httpRequest->getHeader('Cookie')
var_dump($cookiesHeader);

array(1) {
  [0]=>
  string(271) "OCSESSID=3fc4524dcf596uued26f5b6481;  OCSESSID=8f5a45uu3f340f8b4a7ec145b7"
}

but if

$cookies = Header::parse($cookiesHeader);
var_dump($cookies);

array(1) {
  [0]=>
  array(1) {
    ["OCSESSID"]=>
    string(26) "8f5a453f340f8b49ea7ec145b7"
  }
}

Thank you !

public static function parse($header): array

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant