[PR #3] [CLOSED] Fix CurlClient & StreamClient on default mode verify_peer and null ca_info #4

Closed
opened 2026-02-28 14:22:52 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/chillerlan/php-httpinterface/pull/3
Author: @eclipxe13
Created: 3/22/2019
Status: Closed

Base: masterHead: master


📝 Commits (2)

  • f61fa25 Fix CurlClient on default mode verify_peer and default ca_info
  • ac82d51 Fix StreamClient on default mode verify_peer and default ca_info

📊 Changes

4 files changed (+7 additions, -6 deletions)

View changed files

📝 src/Psr18/CurlHandle.php (+5 -2)
📝 src/Psr18/StreamClient.php (+2 -2)
📝 tests/Psr18/CurlClientTest.php (+0 -1)
📝 tests/Psr18/StreamClientTest.php (+0 -1)

📄 Description

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.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/chillerlan/php-httpinterface/pull/3 **Author:** [@eclipxe13](https://github.com/eclipxe13) **Created:** 3/22/2019 **Status:** ❌ Closed **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (2) - [`f61fa25`](https://github.com/chillerlan/php-httpinterface/commit/f61fa251d26d1e95aa9693c5d321793508b15c04) Fix CurlClient on default mode verify_peer and default ca_info - [`ac82d51`](https://github.com/chillerlan/php-httpinterface/commit/ac82d51a8d1172ef92d27ea244d649a5d821676d) Fix StreamClient on default mode verify_peer and default ca_info ### 📊 Changes **4 files changed** (+7 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `src/Psr18/CurlHandle.php` (+5 -2) 📝 `src/Psr18/StreamClient.php` (+2 -2) 📝 `tests/Psr18/CurlClientTest.php` (+0 -1) 📝 `tests/Psr18/StreamClientTest.php` (+0 -1) </details> ### 📄 Description 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-28 14:22:52 +03:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/php-httpinterface#4
No description provided.