Index: src/wp-admin/includes/theme.php
===================================================================
--- src/wp-admin/includes/theme.php	(revision 28942)
+++ src/wp-admin/includes/theme.php	(working copy)
@@ -337,19 +337,19 @@
 		if ( $ssl = wp_http_supports( array( 'ssl' ) ) )
 			$url = set_url_scheme( $url, 'https' );
 
-		$args = array(
+		$http_args = array(
 			'body' => array(
 				'action' => $action,
 				'request' => serialize( $args )
 			)
 		);
-		$request = wp_remote_post( $url, $args );
+		$request = wp_remote_post( $url, $http_args );
 
 		if ( $ssl && is_wp_error( $request ) ) {
 			if ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) {
 				trigger_error( __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server&#8217;s configuration. If you continue to have problems, please try the <a href="https://wordpress.org/support/">support forums</a>.' ) . ' ' . __( '(WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.)' ), headers_sent() || WP_DEBUG ? E_USER_WARNING : E_USER_NOTICE );
 			}
-			$request = wp_remote_post( $http_url, $args );
+			$request = wp_remote_post( $http_url, $http_args );
 		}
 
 		if ( is_wp_error($request) ) {
@@ -359,6 +359,8 @@
 			if ( ! is_object( $res ) && ! is_array( $res ) )
 				$res = new WP_Error('themes_api_failed', __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server&#8217;s configuration. If you continue to have problems, please try the <a href="https://wordpress.org/support/">support forums</a>.' ), wp_remote_retrieve_body( $request ) );
 		}
+	} else {
+		$http_args = array();
 	}
 
 	/**
@@ -366,12 +368,13 @@
 	 *
 	 * @since 2.8.0
 	 *
-	 * @param array|object $res    WordPress.org Themes API response.
-	 * @param string       $action Requested action. Likely values are 'theme_information',
-	 *                             'feature_list', or 'query_themes'.
-	 * @param object       $args   Arguments used to query for installer pages from the WordPress.org Themes API.
+	 * @param array|object $res       WordPress.org Themes API response.
+	 * @param string       $action    Requested action. Likely values are 'theme_information',
+	 *                                'feature_list', or 'query_themes'.
+	 * @param object       $args      Arguments used to query for installer pages from the WordPress.org Themes API.
+	 * @param array        $http_args HTTP request arguments used for native query, if any.
 	 */
-	return apply_filters( 'themes_api_result', $res, $action, $args );
+	return apply_filters( 'themes_api_result', $res, $action, $args, $http_args );
 }
 
 /**
