- Patch #1282986 by valthebald: password of '0' ignored in drupal_http_request().

merge-requests/26/head
Dries Buytaert 2011-09-25 10:25:45 +02:00
parent 28c48b3e44
commit 04bcd01163
1 changed files with 1 additions and 1 deletions

View File

@ -860,7 +860,7 @@ function drupal_http_request($url, array $options = array()) {
// If the server URL has a user then attempt to use basic authentication.
if (isset($uri['user'])) {
$options['headers']['Authorization'] = 'Basic ' . base64_encode($uri['user'] . (!empty($uri['pass']) ? ":" . $uri['pass'] : ''));
$options['headers']['Authorization'] = 'Basic ' . base64_encode($uri['user'] . (isset($uri['pass']) ? ':' . $uri['pass'] : ''));
}
// If the database prefix is being used by SimpleTest to run the tests in a copied