Commit f78cb993 authored by Steven Wittens's avatar Steven Wittens
Browse files

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