简体   繁体   English

通过URL的HTTP基本身份验证不适用于Firefox?

[英]HTTP basic authentication via URL doesn't work with Firefox?

Normally you can login to sites that require HTTP basic authentication by passing the username and password in the URL, eg: 通常,您可以通过在URL中传递用户名和密码来登录需要HTTP基本认证的站点,例如:

http://myusername:myuserpassword@mydomain.com/mypath

On my Linux machine, I could access this website without problems with my Konqueror browser as well as with my Opera browser. 在我的Linux机器上,我的Konqueror浏览器和Opera浏览器都可以正常访问该网站。 But with Firefox it doesn't work? 但是使用Firefox不能正常工作吗? It always displays the "Authentication Required" dialog window? 它总是显示“需要身份验证”对话框窗口吗?

Any ideas why it would work with the other browsers but not with Firefox? 有什么想法为什么可以与其他浏览器一起使用但不能与Firefox一起使用?

Peter 彼得

I got it now, the problem was that FF makes a distinction between 我现在明白了,问题是FF区分了

http://myusername:myuserpassword@mydomain.com/mypath

and

http://myusername:myuserpassword@mydomain.com/mypath/

Notice the "/" at the end of the URL. 注意URL末尾的“ /”。 With the first URL login doesn't work, with the second URL it works now. 使用第一个URL登录不起作用,使用第二个URL现在登录。

Which version of firefox are you using? 您正在使用哪个版本的Firefox?

I just tried it and I get You are about to log in to the site "example.com" with the username "myusername". 我刚刚尝试过,然后You are about to log in to the site "example.com" with the username "myusername".

If I click on 'ok', I log on perfectly... This is using Firefox 3.6.3 on Ubuntu 10.04 如果单击“确定”,则可以完美登录...这是在Ubuntu 10.04上使用Firefox 3.6.3

It does display the "Authentication Required" window if the password is wrong though, which is normal... 如果密码错误,它会显示“需要认证”窗口,这是正常的...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM