From 65f1a4df2665ab0c5b7e603957d7d194b1c4bd04 Mon Sep 17 00:00:00 2001 From: matt Date: Mon, 10 Oct 2005 16:36:54 +0000 Subject: [PATCH] Awesome fix from Dougal about ping timeout problems. git-svn-id: http://svn.automattic.com/wordpress/trunk@2942 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/comment-functions.php | 2 +- wp-includes/functions.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/wp-includes/comment-functions.php b/wp-includes/comment-functions.php index 499f237620..9e0bf2d27f 100644 --- a/wp-includes/comment-functions.php +++ b/wp-includes/comment-functions.php @@ -661,7 +661,7 @@ function discover_pingback_server_uri($url, $timeout_bytes = 2048) { } // Send the GET request - $request = "GET $path HTTP/1.1\r\nHost: $host\r\nUser-Agent: WordPress/$wp_version PHP/" . phpversion() . "\r\n\r\n"; + $request = "GET $path HTTP/1.1\r\nHost: $host\r\nUser-Agent: WordPress/$wp_version \r\n\r\n"; // ob_end_flush(); fputs($fp, $request); diff --git a/wp-includes/functions.php b/wp-includes/functions.php index da63c4a801..c30f38a025 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -926,6 +926,7 @@ function do_enclose( $content, $post_ID ) { } function wp_get_http_headers( $url ) { + global $wp_version; @set_time_limit( 60 ); $parts = parse_url( $url ); $file = $parts['path'] . ($parts['query'] ? '?'.$parts['query'] : ''); @@ -933,7 +934,7 @@ function wp_get_http_headers( $url ) { if ( !isset( $parts['port'] ) ) $parts['port'] = 80; - $head = "HEAD $file HTTP/1.1\r\nHOST: $host\r\nUser-Agent: WordPress/" . $wp_version . " PHP/" . phpversion() . "\r\n"; + $head = "HEAD $file HTTP/1.1\r\nHOST: $host\r\nUser-Agent: WordPress/" . $wp_version . "\r\n\r\n"; $fp = @fsockopen($host, $parts['port'], $err_num, $err_msg, 3); if ( !$fp )