Skip to content

wp_safe_remote_get request to an HTTPS site fails #396

@akirk

Description

@akirk

Code to reproduce:

wp_safe_remote_get( 'https://alex.kirk.at/' );

returns

object(WP_Error)#1235 (3) {
    ["errors"]=> array(1) {
        ["http_request_failed"]=> array(1) {
            [0]=> string(29) "A valid URL was not provided."
        }
    }
    ["error_data"]=> array(0) { }
    ["additional_data":protected]=> array(0) { }
} 

I've identified the reason being that this arg is specified:

"sslcertificates" => "/var/www/html/wp-includes/certificates/ca-bundle.crt",

Maybe that path is not a valid one?
If I directly use

_wp_http_get_object()->request( 'https://alex.kirk.at/' );

Then it works.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions