Ticket #23310: 23310.patch
| File 23310.patch, 1.5 KB (added by , 14 years ago) |
|---|
-
wp-includes/class-http.php
1145 1145 // We don't need to return the body, so don't. Just execute request and return. 1146 1146 if ( ! $r['blocking'] ) { 1147 1147 curl_exec( $handle ); 1148 if ( $curl_error = curl_error( $handle ) ) { 1149 close( $handle ); 1150 return new WP_Error( 'http_request_failed', $curl_error ); 1151 } 1152 if ( in_array( curl_getinfo( $handle, CURLINFO_HTTP_CODE ), array( 301, 302 ) ) ) { 1153 close( $handle ); 1154 return new WP_Error( 'http_request_failed', __( 'Too many redirects.' ) ); 1155 } 1148 1156 curl_close( $handle ); 1149 1157 return array( 'headers' => array(), 'body' => '', 'response' => array('code' => false, 'message' => false), 'cookies' => array() ); 1150 1158 } … … 1158 1166 1159 1167 // If no response 1160 1168 if ( 0 == strlen( $theResponse ) && empty( $theHeaders['headers'] ) ) { 1161 if ( $curl_error = curl_error( $handle ) ) 1169 if ( $curl_error = curl_error( $handle ) ) { 1170 close( $handle ); 1162 1171 return new WP_Error( 'http_request_failed', $curl_error ); 1163 if ( in_array( curl_getinfo( $handle, CURLINFO_HTTP_CODE ), array( 301, 302 ) ) ) 1172 } 1173 if ( in_array( curl_getinfo( $handle, CURLINFO_HTTP_CODE ), array( 301, 302 ) ) ) { 1174 close( $handle ); 1164 1175 return new WP_Error( 'http_request_failed', __( 'Too many redirects.' ) ); 1176 } 1165 1177 } 1166 1178 1167 1179 $this->headers = '';
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)