Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix CurlClient & StreamClient on default mode verify_peer and null ca_info #3

Closed
wants to merge 2 commits into from

Conversation

eclipxe13
Copy link

The default mode for CurlClient and StreamClient is to verify peers, chich is good.
This is set in HTTPOptions.

The problem is that CurlClient and StreamClient set the value even if it is NULL and it make it fail instead of using default configured/system default values.

In this PR:
CurlClient (on CurlHandle) only set this option if can evaluate to true
StreamClient only set this option if can evaluate to true.

Feel free if you found a better way to test it or you don't like the way I did it.

@codecov-io
Copy link

codecov-io commented Mar 22, 2019

Codecov Report

Merging #3 into master will decrease coverage by 0.08%.
The diff coverage is 75%.

Impacted file tree graph

@@             Coverage Diff             @@
##             master      #3      +/-   ##
===========================================
- Coverage     95.28%   95.2%   -0.09%     
- Complexity      385     386       +1     
===========================================
  Files            28      28              
  Lines          1061    1063       +2     
===========================================
+ Hits           1011    1012       +1     
- Misses           50      51       +1
Impacted Files Coverage Δ Complexity Δ
src/Psr18/StreamClient.php 63.63% <100%> (ø) 11 <0> (ø) ⬇️
src/Psr18/CurlHandle.php 78.72% <66.66%> (-0.63%) 35 <0> (+1)

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 a780569...ac82d51. Read the comment docs.

codemasher added a commit that referenced this pull request Mar 22, 2019
codemasher added a commit that referenced this pull request Mar 22, 2019
@codemasher
Copy link
Member

See #2 (comment)

@codemasher codemasher closed this Mar 22, 2019
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants