Bug 37992 - no userid/pw prompt when using sync XHR
Summary: no userid/pw prompt when using sync XHR
Status: RESOLVED DUPLICATE of bug 8342
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL: http://www.mnot.net/javascript/xmlhtt...
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-22 10:23 PDT by Patrick Mueller
Modified: 2010-04-23 11:09 PDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Mueller 2010-04-22 10:23:30 PDT
The problem is that when using XHR to a same-origin URL which uses basic auth, where the current page did not, and if the XHR is sync instead of async, then the user is never prompted for a password.  Instead, the content for the request (in one case, boilerplate from the server talking about the basic auth issue) are returned in the XHR response.

This bug was initially reported against Chrome in this bug:

   http://code.google.com/p/chromium/issues/detail?id=36268

However, newer versions of Chrome do not exhibit the problem.  The latest version of WebKit nightly - r58082 on Mac - does still exhibit the problem.

The problem can be tested with the URL provided in the URL field above, specifically:

   http://www.mnot.net/javascript/xmlhttprequest/

Scroll down to the "Authentication" section near the bottom, and WITHOUT following the link it says to follow first, just press the "run test" button for the "Sync" case.  No prompt, and listed as fail.  Clicking on the "run test" Async flavor does prompt.
Comment 1 Alexey Proskuryakov 2010-04-23 11:09:15 PDT

*** This bug has been marked as a duplicate of bug 8342 ***