Skip to content
Snippets Groups Projects
Commit 298db7a0 authored by catch's avatar catch
Browse files

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

parent 6d5c2113
No related branches found
No related tags found
No related merge requests found
......@@ -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);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment