You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When catching the exception below and you still want to reuse the client every new redirect fails as the counter has not reset.
if (-1 !== $this->maxRedirects) {
if ($this->redirectCount > $this->maxRedirects) {
throw new \LogicException(sprintf('The maximum number (%d) of redirections was reached.', $this->maxRedirects));
}
}
The text was updated successfully, but these errors were encountered:
This PR was merged into the 2.7 branch.
Discussion
----------
Reset redirectCount when throwing exception
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #23197
| License | MIT
When catching the exception throw when exceeding the redirect limit, all new request which results in a redirect fail. By resetting the redirectCount we can still use the same client instance.
Commits
-------
83fd578 Reset redirectCount when throwing exception
When catching the exception below and you still want to reuse the client every new redirect fails as the counter has not reset.
The text was updated successfully, but these errors were encountered: