Thanks to visit codestin.com
Credit goes to github.com

Skip to content

CookiePlugin creates Cookie objects with a DateTime object instead of an max-age integer; causing an InvalidArgumentException #67

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

Closed
Bouwdie opened this issue Mar 17, 2016 · 0 comments

Comments

@Bouwdie
Copy link

Bouwdie commented Mar 17, 2016

CookiePlugin::createCookie is incompatible with the latest Cookie object.
https://github.com/php-http/message/blob/master/src/Cookie.php

Bouwdie pushed a commit to Bouwdie/plugins that referenced this issue Mar 18, 2016
Fix applied by calculating the expireIn (max-age) seconds instead of expire datetime.
Expanded save spec by using a more complete cookie.

Use DATE_COOKIE constant instead of DateTime constant.
Expand the cookie header content with all parts.
Bouwdie pushed a commit to Bouwdie/plugins that referenced this issue Mar 21, 2016
@sagikazarmark sagikazarmark changed the title CookiePlugin creates Cookie objects with a DateTime object instead of an max-age integer; causing an InvalidArgumentException CookiePlugin creates Cookie objects with a DateTime object instead of an max-age integer; causing an InvalidArgumentException Mar 30, 2016
Bouwdie pushed a commit to Bouwdie/plugins that referenced this issue Mar 31, 2016
Bouwdie pushed a commit to Bouwdie/plugins that referenced this issue Mar 31, 2016
…in the century.

Fix php-http#67 Use 2 digit year in cookie expires date to support HHVM.
Bouwdie pushed a commit to Bouwdie/plugins that referenced this issue Mar 31, 2016
…er can not be parsed.

Add test with invalid exprires date content.
Remove obsolete sprintf statement in test.
Bouwdie pushed a commit to Bouwdie/plugins that referenced this issue Apr 1, 2016
Expand the cookie header content test with all parts.
Pass cookie parts as intended to cookie object.
Throw transfer exception when the cookie expires header can not be parsed.
Bouwdie pushed a commit to Bouwdie/plugins that referenced this issue Apr 1, 2016
Expand the cookie header content test with all parts.
Pass cookie parts as intended to cookie object.
Throw transfer exception when the cookie expires header can not be parsed.
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

Successfully merging a pull request may close this issue.

2 participants