Make WordPress Core

Ticket #16606: 16606.patch

File 16606.patch, 676 bytes (added by hakre, 14 years ago)

Test streams transport SSL support

  • wp-includes/class-http.php

    ### Eclipse Workspace Patch 1.0
    #P wordpress-trunk
     
    872872                if ( ! function_exists('fopen') || (function_exists('ini_get') && true != ini_get('allow_url_fopen')) )
    873873                        return false;
    874874
    875                 return apply_filters('use_streams_transport', true, $args);
     875                $use = true;
     876
     877                if ( isset( $args['ssl'] ) && $args['ssl'] ) {
     878                        $use = in_array( 'ssl', stream_get_transports() );
     879                }
     880
     881                return (bool) apply_filters( 'use_streams_transport', $use, $args );
    876882        }
    877883}
    878884