Commit 025ad199 authored by David_Rothstein's avatar David_Rothstein

Issue #1664784 by effulgentsia, mikeytown2: Allow drupal_http_request() to be overridden.

parent 7cbe4b7e
Drupal 7.22, xxxx-xx-xx (development version)
- Allowed the drupal_http_request() function to be overridden so that
additional HTTP request capabilities can be added by contributed modules.
- Changed the Simpletest module to allow PSR-0 test classes to be used in
Drupal 7.
- Removed an unnecessary "Content-Disposition" header from private file
......@@ -785,6 +785,13 @@ function drupal_access_denied() {
* - data: A string containing the response body that was received.
function drupal_http_request($url, array $options = array()) {
// Allow an alternate HTTP client library to replace Drupal's default
// implementation.
$override_function = variable_get('drupal_http_request_function', FALSE);
if (!empty($override_function) && function_exists($override_function)) {
return $override_function($url, $options);
$result = new stdClass();
// Parse the URL and make sure we can handle the schema.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment