Issue #1887046 by Sutharsan: Convert drupal_http_request() usage in install.core.inc to Guzzle.

8.0.x
catch 2013-02-13 12:28:12 +00:00
parent 6d5c211392
commit 298db7a05b
1 changed files with 11 additions and 0 deletions

View File

@ -356,6 +356,17 @@ function install_begin_request(&$install_state) {
// Register a module handler for managing enabled modules.
$container
->register('module_handler', 'Drupal\Core\Extension\ModuleHandler');
// Register the Guzzle HTTP client for fetching translation files from a
// remote translation server such as localization.drupal.org.
$container->register('http_default_client', 'Guzzle\Http\Client')
->addArgument(NULL)
->addArgument(array(
'curl.CURLOPT_TIMEOUT' => 30.0,
'curl.CURLOPT_MAXREDIRS' => 3,
))
->addMethodCall('setUserAgent', array('Drupal (+http://drupal.org/)'));
drupal_container($container);
}