Index: wp-includes/class-http.php
===================================================================
--- wp-includes/class-http.php	(revision 23403)
+++ wp-includes/class-http.php	(working copy)
@@ -163,6 +164,10 @@
 			unset( $r['headers']['user-agent'] );
 		}
 
+		if ( '1.1' == $r['httpversion'] ) {
+			$r['headers']['connection'] = 'close';
+		}
+
 		// Construct Cookie: header if any cookies are set
 		WP_Http::buildCookieHeader( $r );
 
@@ -449,20 +454,19 @@
 
 			if ( $hasChunk ) {
 				if ( empty( $match[1] ) )
-					return $body;
+					return $parsedBody ? $parsedBody : $body;
 
 				$length = hexdec( $match[1] );
 				$chunkLength = strlen( $match[0] );
-
 				$strBody = substr($body, $chunkLength, $length);
 				$parsedBody .= $strBody;
 
-				$body = ltrim(str_replace(array($match[0], $strBody), '', $body), "\n");
+				$body = substr( $body, $length + $chunkLength );
 
 				if ( "0" == trim($body) )
 					return $parsedBody; // Ignore footer headers.
 			} else {
-				return $body;
+				return $parsedBody ? $parsedBody : $body;
 			}
 		}
 	}