Index: wp-includes/class-http.php
===================================================================
--- wp-includes/class-http.php	(revision 26870)
+++ wp-includes/class-http.php	(working copy)
@@ -1087,6 +1087,15 @@
 	private $max_body_length = false;
 
 	/**
+	 * The total bytes written in the current request.
+	 *
+	 * @since 3.9.0
+	 * @access prviate
+	 * @var int
+	 */
+	private $bytes_written_total = 0;
+
+	/**
 	 * The file resource used for streaming to file.
 	 *
 	 * @since 3.6.0
@@ -1252,6 +1261,7 @@
 
 		$this->headers = '';
 		$this->body = '';
+		$this->bytes_written_total = 0;
 
 		$curl_error = curl_errno( $handle );
 
@@ -1327,8 +1337,8 @@
 	private function stream_body( $handle, $data ) {
 		$data_length = strlen( $data );
 
-		if ( $this->max_body_length && ( strlen( $this->body ) + $data_length ) > $this->max_body_length )
-			$data = substr( $data, 0, ( $this->max_body_length - $data_length ) );
+		if ( $this->max_body_length && ( $this->bytes_written_total + $data_length ) > $this->max_body_length )
+			$data = substr( $data, 0, ( $this->max_body_length - $this->bytes_written_total - $data_length ) );
 
 		if ( $this->stream_handle ) {
 			$bytes_written = fwrite( $this->stream_handle, $data );
@@ -1337,6 +1347,8 @@
 			$bytes_written = $data_length;
 		}
 
+		$this->bytes_written_total += $bytes_written;
+
 		// Upon event of this function returning less than strlen( $data ) curl will error with CURLE_WRITE_ERROR
 		return $bytes_written;
 	}
