Closed kotfire closed 5 years ago
This might be a breaking change if people were expecting cookies not to be kept between redirects.
Makes sense, what do you think about making it configurable?
I would like to be able to set it to keep cookies for every redirect given this method is being called internally by other methods.
Something like $this->keepCookiesBetweenRedirects()
or a shorter name that sets a property and check the property in the followRedirects
method. Of course there would be another to disable.
Makes sense, what do you think about making it configurable?
Hmm no. I think it's better if this were to be submitted to master instead.
This pull request makes
followRedirects
keep the cookies from the response when requesting to the new location.I think the follow redirects should behave as browsers and all modern browsers keep the cookies after a redirect.
The changes should not break any existing code, but I am open to make it configurable via opt-in.