Index: wp-includes/http.php
===================================================================
--- wp-includes/http.php	(revision 12723)
+++ wp-includes/http.php	(working copy)
@@ -828,6 +860,23 @@
 		if ( 'http' != $arrURL['scheme'] && 'https' != $arrURL['scheme'] )
 			$url = str_replace($arrURL['scheme'], 'http', $url);
 
+		if ( is_null( $r['headers'] ) )
+			$r['headers'] = array();
+
+		if ( ! is_array($r['headers']) ) {
+			$processedHeaders = WP_Http::processHeaders($r['headers']);
+			$r['headers'] = $processedHeaders['headers'];
+		}
+
+		if ( !empty($r['headers']) ) {
+			$user_agent_extra_headers = '';
+			foreach ( $r['headers'] as $header => $value )
+				$user_agent_extra_headers .= "\r\n$header: $value";
+			@ini_set('user_agent', $r['user-agent'] . $user_agent_extra_headers);
+		} else {
+			@ini_set('user_agent', $r['user-agent']);
+		}
+
 		if ( !WP_DEBUG )
 			$handle = @fopen($url, 'r');
 		else