This technique is widely abused by phishers. Most browsers detect such phishing attacks and warn the user for it (see example in Safari 5).
Firefox might do a better job on this subject: it performs a HEAD request first, to see if the website actually requires authentication. If not, the user receives a warning to make the user aware of a potential phishing attack they might have been trapped into.