Re: XHR using user and password parameters

* Hallvord R. M. Steen wrote:
>Many implementations don't send the Authorize: header even if the script  
>supplies user name and password, unless they have seen a 401 response.  
>This seems a bit counter-intuitive to authors - if they supply a user name  
>and a password, why isn't the browser actually sending it to the server? I  
>think it would be simpler to author for if we sent Authorize: whenever a  
>user name and password is supplied. Are there any particular reason we  
>don't? Would it be seen as violating the HTTP standard's text about 401  
>and Authorize: if we did spec something like that?

You need to know the authentication method in order to form the header,
you don't know whether it's Basic or Digest or some other method, and if
you did, you might still need information from the server such as the
realm. So, you need to make a failing request first, unless you limit
yourself to Basic authentication.
Björn Höhrmann · ·
Am Badedeich 7 · Telefon: +49(0)160/4415681 ·
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · 

Received on Monday, 11 July 2011 13:51:57 UTC