From f78cb9932b36b8f16b91f1a9e08d2bdf3f736b1e Mon Sep 17 00:00:00 2001 From: Steven Wittens Date: Wed, 7 Jan 2004 20:43:26 +0000 Subject: - 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. --- includes/common.inc | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/includes/common.inc b/includes/common.inc index cad24179a..72e9e2051 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -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; - } } /** -- cgit v1.2.3