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

Closed
hayden-t opened this issue Dec 11, 2023 · 1 comment
Closed

Header::parse loosing cookies with same name #586

hayden-t opened this issue Dec 11, 2023 · 1 comment

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

Copy link

stale bot commented Feb 1, 2025

This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 2 weeks if no further activity occurs. Thank you for your contributions.

@stale stale bot added the lifecycle/stale label Feb 1, 2025
@stale stale bot closed this as completed Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant