-
Notifications
You must be signed in to change notification settings - Fork 58
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
Re-using the cURL handle breaks all but the first request #35
Comments
Weird! |
@xrstf What is your version of cURL please? |
I'm using PHP 5.6.1:
|
@xrstf If you add the |
@Hywan even if that solved his issue, I think the most important thing is that we attempt to reproduce this and figure out why it's happening in the first place. On my machine, this is definitely not a problem... |
I can reproduce this with 4.0.0-alpha1. It is fixed on most recent master, but sabre/dav still uses 4.0.0-alpha1. Adding the following to "require": {
"sabre/http": "dev-master as 4.0.0-alpha1"
} I’m using PHP 5.5.24 on Fedora 20 (cURL 7.32.0). As some people reported not being able to reproduce this: If you have anything I can do to help testing this, just contact me (here or via mail). |
Hi Andreas, I'm releasing 4.0.0-alpha2 right now to solve this. |
Oh my I never realized this was the same ticket as #47 :( On the bright side, the unittests are now changed to catch issues similar to this. I'm very sorry you had to wait this long. |
Just released the second alpha |
I am using SabreDAV 2.0.5 with Sabre HTTP 2.0.4 on PHP 5.6 (Win x64). This is my test code, which should just check if a file exists (expected to 404) and then create it:
We are -- for testing -- tunneling WebDAV through nginx. Unexpectedly, we get an HTTP 500 for the PUT request, because it looks like this in Fiddler
There is no content and no
Content-Length
header, making the nginx barf.I traced the problem down to the
Sabre\HTTP\Client
class and its recycling of the cURL handle.If I disable the
if
and always recreate a new cURL handle, everything works as expected.Since the
curlHandle
is private, I have very little chance to work around this except creating a new SabreDAV client for every single request.The text was updated successfully, but these errors were encountered: