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
Redirect in curl_multi causes hang #211
Comments
Update CircleCI code to avoid redirect, in order to avoid php-vcr/php-vcr#211
Any ideas on how to fix this ? I'm trying to use php-vcr to test against Azure-php. If something calls the azure api once, it works, but the second call makes the recording hang. |
Did you find anything @darxmac I'm running with the same behaviour, the VCR hangs on any request POST via cURL. It has to be related to a lack of Content-Lenght in the response header. I can't yet confirm it 100% but many of google search point to that. |
No, nothing. Sadly this project is a bit abandoned
…Sent from my iPhone
On 20 Feb 2018, at 11.54, Luigi ***@***.***> wrote:
Did you find anything @darxmac I'm running with the same behaviour, the VCR hangs on any request POST via cURL. It has to be related to a lack of Content-Lenght in the response header. I can't yet confirm it 100% but many of google search point to that.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Hey guys! If you are still facing this issue, it should be solved by #248. |
### Context When using PHP-VCR with Guzzle 6 with async requests, the first request is playing correctly but the next request is putting Guzzle in an infinite loop. It took me a whole day but I traced back this problem to the way the "curl_reset" hook is written. It clears the request but not the response. Hence, when another request is performed (even on a different URL) the same response is sent. This weird behaviour is causing an infinite loop in Guzzle 6. This problem is probably exactly the same as the issue #211. This PR should fix it. ### What has been done The first commit of this PR contains only the failing test (to showcase the problem). You see that the test never completes (because of the infinite loop): https://travis-ci.org/php-vcr/php-vcr/jobs/366140696 The second commit is the fix. I simply added one line in the curl_reset hook to remove the response as well as the request. Note: this PR is based on the branch from PR #246 since I need unit tests from Guzzle 6 that are not yet merged.
Please try to use v1.4.4 to see if the problem is solved |
Repro:
The first request completes (and correctly follows the redirect), but the second request hangs indefinitely. Guzzle itself handles this correctly, and it does not hang if VCR is disabled.
The text was updated successfully, but these errors were encountered: