Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Error parse cookie from header #272

Closed
StApostol opened this issue Sep 28, 2017 · 2 comments
Closed

Error parse cookie from header #272

StApostol opened this issue Sep 28, 2017 · 2 comments
Assignees
Labels

Comments

@StApostol
Copy link

Client send cookie
PHPSESSID=mckio0avb9bkminedcftmsrcrf; cookie_region=7; CakeCookie[cookie_region]=7

And method parseCookieHeader return array only with 2 elements PHPSESSID and cookie_region.
But in $_COOKIE I have 3 elements
`
Array
(
[PHPSESSID] => mckio0avb9bkminedcftmsrcrf
[cookie_region] => 7
[CakeCookie] => Array
(
[cookie_region] => 7
)

)`

@Ocramius
Copy link
Member

Those are 3 elements:

PHPSESSID=mckio0avb9bkminedcftmsrcrf; cookie_region=7; CakeCookie[cookie_region]=7
  • PHPSESSID=mckio0avb9bkminedcftmsrcrf;
  • cookie_region=7;
  • CakeCookie[cookie_region]=7 (which is parsed to an array)

@Ocramius Ocramius self-assigned this Sep 28, 2017
@mposchl
Copy link

mposchl commented Apr 9, 2019

I think this should be reopened, becasue the parser really does not parse the mentioned header string properly. the regular expression is not right. it really parses only the two values and not the last one-with the array

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

No branches or pull requests

3 participants