The htpasswd files I'm familiar with don't have a realm
Are you using an htdigest file?
Neat work-around