Changeset 11154 for trunk/wp-includes/http.php
- Timestamp:
- 05/01/2009 11:53:38 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/http.php
r11143 r11154 605 605 $arrURL = parse_url($url); 606 606 607 $fsockopen_host = $arrURL['host']; 608 607 609 $secure_transport = false; 608 610 609 if ( ! isset( $arrURL['port']) ) {610 if ( ( $arrURL['scheme'] == 'ssl' || $arrURL['scheme'] == 'https') && extension_loaded('openssl') ) {611 $ arrURL['host'] = 'ssl://' . $arrURL['host'];611 if ( ! isset( $arrURL['port'] ) ) { 612 if ( ( $arrURL['scheme'] == 'ssl' || $arrURL['scheme'] == 'https' ) && extension_loaded('openssl') ) { 613 $fsockopen_host = "ssl://$fsockopen_host"; 612 614 $arrURL['port'] = 443; 613 615 $secure_transport = true; … … 628 630 if ( !defined('WP_DEBUG') || ( defined('WP_DEBUG') && false === WP_DEBUG ) ) { 629 631 if ( $proxy->is_enabled() && $proxy->send_through_proxy( $url ) ) 630 $handle = @fsockopen( $proxy->host(), $proxy->port(), $iError, $strError, $r['timeout'] );632 $handle = @fsockopen( $proxy->host(), $proxy->port(), $iError, $strError, $r['timeout'] ); 631 633 else 632 $handle = @fsockopen( $arrURL['host'], $arrURL['port'], $iError, $strError, $r['timeout'] );634 $handle = @fsockopen( $fsockopen_host, $arrURL['port'], $iError, $strError, $r['timeout'] ); 633 635 } else { 634 636 if ( $proxy->is_enabled() && $proxy->send_through_proxy( $url ) ) 635 $handle = fsockopen( $proxy->host(), $proxy->port(), $iError, $strError, $r['timeout'] );637 $handle = fsockopen( $proxy->host(), $proxy->port(), $iError, $strError, $r['timeout'] ); 636 638 else 637 $handle = fsockopen( $arrURL['host'], $arrURL['port'], $iError, $strError, $r['timeout'] );639 $handle = fsockopen( $fsockopen_host, $arrURL['port'], $iError, $strError, $r['timeout'] ); 638 640 } 639 641 … … 2002 2004 */ 2003 2005 function wp_remote_retrieve_response_code(&$response) { 2004 if ( is_wp_error($response) || ! isset($response['response']) || ! is_array($response['response']))2006 if ( is_wp_error($response) || ! isset($response['response']) || ! is_array($response['response'])) 2005 2007 return ''; 2006 2008
Note: See TracChangeset
for help on using the changeset viewer.