### Eclipse Workspace Patch 1.0
#P wordpress-trunk
|
|
|
|
| 1147 | 1147 | // themselves... Although, it is somewhat pointless without some reference. |
| 1148 | 1148 | do_action_ref_array( 'http_api_curl', array(&$handle) ); |
| 1149 | 1149 | |
| | 1150 | $theResponse = curl_exec( $handle ); |
| | 1151 | $result = apply_filters( 'curl_transport_exec', array( false, $theResponse, $r ), $handle ); |
| | 1152 | if ( $result && is_array( $result ) && array_shift( $result ) && 2 === count( $result ) ) { |
| | 1153 | list( $theResponse, $r ) = $result; |
| | 1154 | } |
| | 1155 | |
| 1150 | 1156 | // We don't need to return the body, so don't. Just execute request and return. |
| 1151 | 1157 | if ( ! $r['blocking'] ) { |
| 1152 | | curl_exec( $handle ); |
| 1153 | 1158 | curl_close( $handle ); |
| 1154 | 1159 | return array( 'headers' => array(), 'body' => '', 'response' => array('code' => false, 'message' => false), 'cookies' => array() ); |
| 1155 | 1160 | } |
| 1156 | 1161 | |
| 1157 | | $theResponse = curl_exec( $handle ); |
| 1158 | | |
| 1159 | 1162 | if ( !empty($theResponse) ) { |
| 1160 | 1163 | $headerLength = curl_getinfo($handle, CURLINFO_HEADER_SIZE); |
| 1161 | 1164 | $theHeaders = trim( substr($theResponse, 0, $headerLength) ); |