Make WordPress Core

Changeset 11630


Ignore:
Timestamp:
06/23/2009 07:18:27 PM (15 years ago)
Author:
ryan
Message:

Revert [11524]. curl has its problems, but so does everything else. see #9998 fixes #10104 for trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/http.php

    r11524 r11630  
    7474     * that object to be used later.
    7575     *
    76      * The order for the GET/HEAD requests are HTTP Extension, FSockopen Streams,
    77      * Fopen, and finally cURL. Whilst Fsockopen has the highest overhead, Its
    78      * used 2nd due to high compatibility with most hosts, The HTTP Extension is
    79      * tested first due to hosts which have it enabled, are likely to work
    80      * correctly with it.
     76     * The order for the GET/HEAD requests are Streams, HTTP Extension, Fopen,
     77     * and finally Fsockopen. fsockopen() is used last, because it has the most
     78     * overhead in its implementation. There isn't any real way around it, since
     79     * redirects have to be supported, much the same way the other transports
     80     * also handle redirects.
    8181     *
    8282     * There are currently issues with "localhost" not resolving correctly with
     
    9999                $working_transport['exthttp'] = new WP_Http_ExtHttp();
    100100                $blocking_transport[] = &$working_transport['exthttp'];
    101             } else if ( true === WP_Http_Fsockopen::test($args) ) {
    102                 $working_transport['fsockopen'] = new WP_Http_Fsockopen();
    103                 $blocking_transport[] = &$working_transport['fsockopen'];
     101            } else if ( true === WP_Http_Curl::test($args) ) {
     102                $working_transport['curl'] = new WP_Http_Curl();
     103                $blocking_transport[] = &$working_transport['curl'];
    104104            } else if ( true === WP_Http_Streams::test($args) ) {
    105105                $working_transport['streams'] = new WP_Http_Streams();
     
    108108                $working_transport['fopen'] = new WP_Http_Fopen();
    109109                $blocking_transport[] = &$working_transport['fopen'];
    110             } else if ( true === WP_Http_Curl::test($args) ) {
    111                 $working_transport['curl'] = new WP_Http_Curl();
    112                 $blocking_transport[] = &$working_transport['curl'];
     110            } else if ( true === WP_Http_Fsockopen::test($args) ) {
     111                $working_transport['fsockopen'] = new WP_Http_Fsockopen();
     112                $blocking_transport[] = &$working_transport['fsockopen'];
    113113            }
    114114
     
    150150                $working_transport['exthttp'] = new WP_Http_ExtHttp();
    151151                $blocking_transport[] = &$working_transport['exthttp'];
     152            } else if ( true === WP_Http_Curl::test($args) ) {
     153                $working_transport['curl'] = new WP_Http_Curl();
     154                $blocking_transport[] = &$working_transport['curl'];
     155            } else if ( true === WP_Http_Streams::test($args) ) {
     156                $working_transport['streams'] = new WP_Http_Streams();
     157                $blocking_transport[] = &$working_transport['streams'];
    152158            } else if ( true === WP_Http_Fsockopen::test($args) ) {
    153159                $working_transport['fsockopen'] = new WP_Http_Fsockopen();
    154160                $blocking_transport[] = &$working_transport['fsockopen'];
    155             } else if ( true === WP_Http_Streams::test($args) ) {
    156                 $working_transport['streams'] = new WP_Http_Streams();
    157                 $blocking_transport[] = &$working_transport['streams'];
    158             } else if ( true === WP_Http_Curl::test($args) ) {
    159                 $working_transport['curl'] = new WP_Http_Curl();
    160                 $blocking_transport[] = &$working_transport['curl'];
    161161            }
    162162
Note: See TracChangeset for help on using the changeset viewer.