credentials(
-user => 'username',
-pass => 'password',
-url => 'http://localhost'
)
Now, credentials get stored in a hash like this:
{
'netloc' => {
'realm' => [ 'username', 'password' ]
}
}
By setting the credentials without a realm, it puts them under the default realm, so we end up with:
{
'localhost' => {
'default' => [ 'username', 'password' ]
}
}
The problem is that for some reason after connecting, it discovers the realm name and decides to populate the hash above with an empty set of credentials for the realm:
{
'localhost' => {
'default' => [ 'username', 'password' ],
'YOUR_REALM' => [ ]
}
}
When it goes to retrieve the credentials, it goes in this order:
{ netloc }{ realm }
{ default }{ realm }
{ netloc }{ default }
Since it entered blank credentials for the netloc+realm combination, it grabs those first. Seems like there's something wrong, it probably shouldn't be entering in the blank credentials.
|