CRM-17253 omit expensive unused information from token query
[civicrm-core.git] / CRM / Utils / HttpClient.php
index 59c56eb8101879d43d29814f91fba03f26d7af03..f089f7a6d46cc75ac6ab1e77e8e04a62aaffa8b1 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.6                                                |
+ | CiviCRM version 4.7                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014                                |
+ | Copyright CiviCRM LLC (c) 2004-2015                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -23,7 +23,7 @@
  | GNU Affero General Public License or the licensing of CiviCRM,     |
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
-*/
+ */
 
 /**
  * This class handles HTTP downloads
@@ -34,7 +34,7 @@
  * want to deal with that so late in the 4.3 dev cycle.
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
+ * @copyright CiviCRM LLC (c) 2004-2015
  * $Id$
  *
  */
@@ -114,11 +114,12 @@ class CRM_Utils_HttpClient {
   }
 
   /**
-   * Send an HTTP GET for a remote resource
+   * Send an HTTP GET for a remote resource.
    *
    * @param string $remoteFile
    *   URL of remote file.
-   * @return array array(0 => STATUS_OK|STATUS_DL_ERROR, 1 => string)
+   * @return array
+   *   array(0 => STATUS_OK|STATUS_DL_ERROR, 1 => string)
    */
   public function get($remoteFile) {
     // Download extension zip file ...
@@ -151,13 +152,14 @@ class CRM_Utils_HttpClient {
   }
 
   /**
-   * Send an HTTP POST for a remote resource
+   * Send an HTTP POST for a remote resource.
    *
    * @param string $remoteFile
    *   URL of a .zip file.
    * @param array $params
    *
-   * @return array array(0 => STATUS_OK|STATUS_DL_ERROR, 1 => string)
+   * @return array
+   *   array(0 => STATUS_OK|STATUS_DL_ERROR, 1 => string)
    */
   public function post($remoteFile, $params) {
     // Download extension zip file ...
@@ -190,10 +192,10 @@ class CRM_Utils_HttpClient {
 
   /**
    * @param string $remoteFile
-   * @return array (0 => resource, 1 => CA_Config_Curl)
+   * @return array
+   *   (0 => resource, 1 => CA_Config_Curl)
    */
   protected function createCurl($remoteFile) {
-    require_once 'CA/Config/Curl.php';
     $caConfig = CA_Config_Curl::probe(array(
       'verify_peer' => (bool) CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'verifySSL', NULL, TRUE),
     ));