Make WordPress Core

Ticket #16920: 16920.patch

File 16920.patch, 1.2 KB (added by hakre, 14 years ago)

class-http.php

  • wp-includes/class-http.php

    ### Eclipse Workspace Patch 1.0
    #P wordpress-trunk
     
    13291329
    13301330                if ( $proxy->is_enabled() && $proxy->send_through_proxy( $url ) ) {
    13311331
    1332                         $isPHP5 = version_compare(PHP_VERSION, '5.0.0', '>=');
     1332                        curl_setopt( $handle, CURLOPT_PROXYTYPE, CURLPROXY_HTTP );
     1333                        curl_setopt( $handle, CURLOPT_PROXY, $proxy->host() );
     1334                        curl_setopt( $handle, CURLOPT_PROXYPORT, $proxy->port() );
    13331335
    1334                         if ( $isPHP5 ) {
    1335                                 curl_setopt( $handle, CURLOPT_PROXYTYPE, CURLPROXY_HTTP );
    1336                                 curl_setopt( $handle, CURLOPT_PROXY, $proxy->host() );
    1337                                 curl_setopt( $handle, CURLOPT_PROXYPORT, $proxy->port() );
    1338                         } else {
    1339                                 curl_setopt( $handle, CURLOPT_PROXY, $proxy->host() .':'. $proxy->port() );
    1340                         }
    1341 
    13421336                        if ( $proxy->use_authentication() ) {
    1343                                 if ( $isPHP5 )
    1344                                         curl_setopt( $handle, CURLOPT_PROXYAUTH, CURLAUTH_ANY );
    1345 
     1337                                curl_setopt( $handle, CURLOPT_PROXYAUTH, CURLAUTH_ANY );
    13461338                                curl_setopt( $handle, CURLOPT_PROXYUSERPWD, $proxy->authentication() );
    13471339                        }
    13481340                }