Make WordPress Core

Changeset 12472


Ignore:
Timestamp:
12/21/2009 07:34:38 PM (17 years ago)
Author:
ryan
Message:

Don't use CURLOPT_CONNECTTIMEOUT_MS or CURLOPT_TIMEOUT_MS due to bugginess. fixes #11505 see #11499

File:
1 edited

Legend:

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

    r12424 r12472  
    12971297                // CURLOPT_TIMEOUT and CURLOPT_CONNECTTIMEOUT expect integers.  Have to use ceil since
    12981298                // a value of 0 will allow an ulimited timeout.
    1299                 // Use _MS if available.
    1300                 if ( defined( 'CURLOPT_TIMEOUT_MS' ) ) {
    1301                         $timeout_ms = (int) ceil( 1000 * $r['timeout'] );
    1302                         curl_setopt( $handle, CURLOPT_CONNECTTIMEOUT_MS, $timeout_ms );
    1303                         curl_setopt( $handle, CURLOPT_TIMEOUT_MS, $timeout_ms );
    1304                 } else {
    1305                         $timeout = (int) ceil( $r['timeout'] );
    1306                         curl_setopt( $handle, CURLOPT_CONNECTTIMEOUT, $timeout );
    1307                         curl_setopt( $handle, CURLOPT_TIMEOUT, $timeout );
    1308                 }
     1299                $timeout = (int) ceil( $r['timeout'] );
     1300                curl_setopt( $handle, CURLOPT_CONNECTTIMEOUT, $timeout );
     1301                curl_setopt( $handle, CURLOPT_TIMEOUT, $timeout );
    13091302
    13101303                curl_setopt( $handle, CURLOPT_URL, $url);
Note: See TracChangeset for help on using the changeset viewer.