if ( false ===
$handle ) { // SSL connection failed due to expired/invalid cert, or, OpenSSL configuration is broken.
if ( $secure_transport && 0 ===
$connection_error && '' ===
$connection_error_str ) { return new WP_Error( 'http_request_failed',
__( 'The SSL certificate for the host could not be verified.'
) );
} return new WP_Error( 'http_request_failed',
$connection_error . ': ' .
$connection_error_str );
} // Verify that the SSL certificate is valid for this request.
if ( $secure_transport &&
$ssl_verify && !
$proxy->
is_enabled() ) { if ( ! self::
verify_ssl_certificate( $handle,
$parsed_url['host'
] ) ) { return new WP_Error( 'http_request_failed',
__( 'The SSL certificate for the host could not be verified.'
) );
} } stream_set_timeout( $handle,
$timeout,
$utimeout );
if ( $proxy->
is_enabled() &&
$proxy->
send_through_proxy( $url ) ) { // Some proxies require full URL in this field.
$request_path =
$url;
} else { $request_path =
$parsed_url['path'
] .
( isset( $parsed_url['query'
] ) ? '?' .
$parsed_url['query'
] : ''
);
}