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

how to set options (verify to false) for request_multiple? #294

Open
bkarthik opened this issue Oct 17, 2017 · 1 comment · May be fixed by #312
Open

how to set options (verify to false) for request_multiple? #294

bkarthik opened this issue Oct 17, 2017 · 1 comment · May be fixed by #312
Milestone

Comments

@bkarthik
Copy link

Hi,

I'm trying to set verify as false use the following snippet.
$requests = array(
'label1'=>array(
'url' => 'https://test.com',
'headers' =>array(
'Content-Type' => 'application/json',),
'options' => array(
'verify' => false,
),
),
)
as per documentation if we set verify to false it should ignore ssl verification but i'm still getting SSL certificate problem: unable to get local issuer certificate. Am I doing something wrong here?

@soulseekah
Copy link
Contributor

Reproduced. This seems to be a bug in both the fsockopen transport and the cURL transports.

For cURL The request_multi method does not take into account the verify option at all, moving the needed curl_setopt out of request into setup_handle fixes the issue.

For fsockopen the issue seems a bit more serious. Setting verify to false doesn't work for single requests, see #310

soulseekah added a commit to soulseekah/Requests that referenced this issue Feb 11, 2018
The `request_multi` method does not take into account the verify option,
unlike `request`. Moved the verify logic into `setup_handler` which does
all the `curl_setopt` calls anyway and is called from both the multiple
and single request options.

With tests. Contigent on WordPress#310 for fsockopen verify fix.

Fixes WordPress#294
@soulseekah soulseekah linked a pull request Feb 11, 2018 that will close this issue
@jrfnl jrfnl added this to the 2.1.0 milestone Nov 25, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants