Opened 11 years ago
Closed 11 years ago
#11364 closed bug (invalid)
ajax Basic Authentification does not seem to work in latest Chrome nightlies
Reported by: | 343max | Owned by: | |
---|---|---|---|
Priority: | low | Milestone: | None |
Component: | ajax | Version: | 1.7.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
This test:
$.ajax(tabulatabsServerPath + 'hello/hello_secure.json', { type: 'GET', username: 'Tester', password: 'greets', success: function(r) { equal(r.greeted, 'Hello Tester!', 'authentification is working'); start(); } });
always returns 401 not authorized in the latest Chrome Betas/Chrome Canries
I could fix it by manually setting the Authorization request header in the beforeSend callback:
$.ajax(tabulatabsServerPath + 'hello/hello_secure.json', { type: 'GET', username: 'Tester', password: 'greets', beforeSend: function(jqXHR, settings) { if (settings.username) { jqXHR.setRequestHeader('Authorization', 'Basic ' + base64_encode(settings.username + ':' + settings.password) + '=='); } }, success: function(r) { equal(r.greeted, 'Hello Tester!', 'authentification is working'); start(); } });
Change History (3)
comment:1 Changed 11 years ago by
comment:2 Changed 11 years ago by
Component: | unfiled → ajax |
---|---|
Priority: | undecided → low |
Status: | new → open |
comment:3 Changed 11 years ago by
Resolution: | → invalid |
---|---|
Status: | open → closed |
Since we haven't heard more about this I will assume it was a Chrome bug that got fixed before it was released.
Note: See
TracTickets for help on using
tickets.
You should create a ticket against webkit or chrome just to make sure this change is intended. If it is, then we'll proceed into adding yet another browser-specific trick.