Index: includes/common.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/common.inc,v retrieving revision 1.1204 diff -u -p -r1.1204 common.inc --- includes/common.inc 10 Aug 2010 01:00:42 -0000 1.1204 +++ includes/common.inc 10 Aug 2010 23:41:42 -0000 @@ -911,7 +911,15 @@ function drupal_http_request($url, array $response = preg_split("/\r\n|\n|\r/", $response); // Parse the response status line. - list($protocol, $code, $status_message) = explode(' ', trim(array_shift($response)), 3); + // If the response does not include a description, don't try to process it. + // The test length of 13 includes the protocol and version, a space, the + // response code and one additional space, e.g., "HTTP/1.1 200 " + if (strlen($split[0]) > 13) { + list($protocol, $code, $status) = explode(' ', trim(array_shift($response)), 3); + } + else { + list($protocol, $code) = explode(' ', trim(array_shift($response)), 2); + } $result->protocol = $protocol; $result->status_message = $status_message;