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

Update library/Zend/Http/Header/SetCookie.php #2421

Closed
wants to merge 2 commits into from

Conversation

PHPGangsta
Copy link
Contributor

Cookies were not handled correctly. If you had a cookie for .sub.domain.de from the last response and then fired a new request to www.sub.domain.de, the old cookie was not added to the request (because .sub.domain.de is a substring of www.sub.domain.de, it should be added, the method should return true which was not the case).

Cookies were not handled correctly. If you had a cookie for .sub.domain.de from the last response and then fired a new request to www.sub.domain.de, the old cookie was not added to the request (because .sub.domain.de is a substring of www.sub.domain.de, it should be added, the method should return true which was not the case).
@ghost ghost assigned ezimuel Sep 26, 2012
@weierophinney
Copy link
Member

@PHPGangsta Can you add a test for this please? I'm worried that, due to the small change, the condition could be toggled again in the future, and without a test, go unnoticed.

@PHPGangsta
Copy link
Contributor Author

@weierophinney Added a test and some assertions. Can you please check it? I don't have phpunit running here (crappy windows with old phpunit 3.5.14). Travis says it's fine, and I hope the assertions are correct.

Without the bugfix, the first and second assertion should fail I think.

weierophinney added a commit that referenced this pull request Oct 3, 2012
weierophinney added a commit to zendframework/zend-http that referenced this pull request May 15, 2015
weierophinney added a commit to zendframework/zend-http that referenced this pull request May 15, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants