Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent cURL transport from leaking on Exception
The `CURLOPT_HEADERFUNCTION` and `CURLOPT_WRITEFUNCTION` options are not being reset if a cURL handle error occurs (which throws a `Requests_Exception` and stops execution). The destructor is not called due to lingering instance method callbacks in the two options. Move `CURLOPT_HEADERFUNCTION` and `CURLOPT_WRITEFUNCTION` cleanup before any exceptions can happen.
- Loading branch information