Commit f78cb993 authored by Steven Wittens's avatar Steven Wittens

- Fixed ability to override default HTTP headers in drupal_http_request().

- Fixed issue with drupal_get_path_alias(): should return false for non-aliased URLs.
parent 94f6e94f
......@@ -231,9 +231,9 @@ function drupal_http_request($url, $headers = array(), $method = 'GET', $data =
// Create http request
$defaults = array(
'host' => "Host: $uri[host]",
'user-agent' => 'User-Agent: Drupal (+http://www.drupal.org/)',
'content-length' => 'Content-Length: '. strlen($data)
'Host' => "Host: $uri[host]",
'User-Agent' => 'User-Agent: Drupal (+http://www.drupal.org/)',
'Content-Length' => 'Content-Length: '. strlen($data)
);
foreach ($headers as $header => $value) {
......@@ -893,9 +893,6 @@ function drupal_get_path_alias($path) {
elseif (function_exists("conf_url_rewrite")) {
return conf_url_rewrite($path, 'outgoing');
}
else {
return $path;
}
}
/**
......
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