From ab4e39da832da4929df3c0a327dffb657f24b544 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Wed, 13 Aug 2008 07:11:18 +0000 Subject: - Patch #283806 by mustafau: fixed bug in drupal_http_request() and added some first drupal_http_request() tests to core. Yay. --- includes/common.inc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'includes/common.inc') diff --git a/includes/common.inc b/includes/common.inc index e791deca2..7a61a7512 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -436,13 +436,13 @@ function drupal_http_request($url, $headers = array(), $method = 'GET', $data = // Parse the URL and make sure we can handle the schema. $uri = parse_url($url); - if (!isset($uri['scheme'])) { - $result->error = 'missing schema'; + if ($uri == FALSE) { + $result->error = 'unable to parse URL'; return $result; } - if (!isset($uri['host'])) { - $result->error = 'missing host'; + if (!isset($uri['scheme'])) { + $result->error = 'missing schema'; return $result; } -- cgit v1.2.3