Skip to content
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

Executing multiple PUT requests makes curl emit warnings #99

Merged
merged 1 commit into from
Apr 8, 2018

Conversation

christiaan
Copy link
Contributor

As reported in issue #89
See also this related stack overflow article

Copy link
Member

@staabm staabm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any chance to get a unit test covering the change?

@codecov-io
Copy link

codecov-io commented Apr 8, 2018

Codecov Report

Merging #99 into master will decrease coverage by 0.17%.
The diff coverage is 0%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master      #99      +/-   ##
============================================
- Coverage        89%   88.83%   -0.18%     
  Complexity      244      244              
============================================
  Files            15       15              
  Lines           782      779       -3     
============================================
- Hits            696      692       -4     
- Misses           86       87       +1
Impacted Files Coverage Δ Complexity Δ
lib/Client.php 57.31% <0%> (-1.37%) 49 <0> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 087ad4b...4a1a958. Read the comment docs.

@christiaan
Copy link
Contributor Author

I've added a test and removed some previously needed workarounds that were required because CURL_OPTs were persisted between requests. With the introduction of curl_reset those problems are fixed.

Is it worthwhile to also open a PR for the latest stable that fixes this problem? As I've currently got this patched locally to even have my code working

@staabm
Copy link
Member

staabm commented Apr 8, 2018

Hmm I guess you accidentally removed the curl_reset() call?

We cannot add the same patch on the latest stable release, because our 4.2 release supports php 5.4 and curl_reset() was added in 5.5

This fixes sabre-io#89 Executing multiple PUT requests makes curl emit warnings

Since the php 7.0 is now required it is save to use curl_reset to fix
previous issues with CURL_OPTS that were persisted between requests
@christiaan
Copy link
Contributor Author

I tried a different approach before as I did not notice that PHP 7 was now required so I removed the reset.
And of course I forgot to put it back... I've overwritten the commit

Copy link
Member

@staabm staabm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really like it! Lets see what others think

@staabm staabm requested a review from evert April 8, 2018 08:16
Copy link
Member

@evert evert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@staabm staabm merged commit 2e86f4f into sabre-io:master Apr 8, 2018
@staabm staabm mentioned this pull request Jun 4, 2018
@christiaan christiaan deleted the fix_89 branch August 16, 2020 05:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants