Changeset 10579
- Timestamp:
- 02/15/2009 08:56:54 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/comment.php
r10564 r10579 1255 1255 return false; 1256 1256 1257 $response = wp_remote_get( $url, array( 'timeout' => 2, 'httpversion' => '1.1' ) ); 1257 //Do not search for a pingback server on our own uploads 1258 $uploads_dir = wp_upload_dir(); 1259 if ( 0 === strpos($url, $uploads_dir['baseurl']) ) 1260 return false; 1261 1262 $response = wp_remote_head( $url, array( 'timeout' => 2, 'httpversion' => '1.0' ) ); 1258 1263 1259 1264 if ( is_wp_error( $response ) ) … … 1265 1270 // Not an (x)html, sgml, or xml page, no use going further. 1266 1271 if ( isset( $response['headers']['content-type'] ) && preg_match('#(image|audio|video|model)/#is', $response['headers']['content-type']) ) 1272 return false; 1273 1274 // Now do a GET since we're going to look in the html headers (and we're sure its not a binary file) 1275 $response = wp_remote_get( $url, array( 'timeout' => 2, 'httpversion' => '1.0' ) ); 1276 1277 if ( is_wp_error( $response ) ) 1267 1278 return false; 1268 1279
Note: See TracChangeset
for help on using the changeset viewer.