Bug 14833 - XMLHttpRequest with incorrect credentials raises an exception on Windows
Summary: XMLHttpRequest with incorrect credentials raises an exception on Windows
Status: RESOLVED WORKSFORME
Alias: None
Product: WebKit
Classification: Unclassified
Component: XML (show other bugs)
Version: 523.x (Safari 3)
Hardware: All Windows XP
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar, PlatformOnly
Depends on:
Blocks: 10489
  Show dependency treegraph
 
Reported: 2007-07-31 11:48 PDT by Jesse Costello-Good
Modified: 2010-07-12 14:40 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Costello-Good 2007-07-31 11:48:14 PDT
The following works on the MacOS X nightly but not on Intel. On Intel, r.status is 401 (access denied).

var r = new XMLHttpRequest();
r.open("GET", "http://gi.tibco.com/tests/auth/data1.xml", false, "gi", "gi");
r.send();
assertEquals(200, r.status);
Comment 1 Matt Lilek 2007-07-31 13:02:41 PDT
(In reply to comment #0)
> The following works on the MacOS X nightly but not on Intel. On Intel, r.status
> is 401 (access denied).

Just to clarify - by Intel do you mean Windows (assuming this is the case from the Platform field) or is there a difference between a PPC nightly and an Intel nightly on Mac OS X?
Comment 2 Matt Lilek 2007-07-31 13:03:23 PDT
s/Platform/OS
Comment 3 Jesse Costello-Good 2007-07-31 13:10:03 PDT
Sorry, my post is confusing. I'm on a MacBook Pro running 10.4 and Parallels with Windows XP. On Windows XP the status code is 401, on MacOS X it is 200.
Comment 4 David Kilzer (:ddkilzer) 2007-07-31 23:32:25 PDT
(In reply to comment #3)
> Sorry, my post is confusing. I'm on a MacBook Pro running 10.4 and Parallels
> with Windows XP. On Windows XP the status code is 401, on MacOS X it is 200.

Are you running (roughly) the same WebKit Nightly build on both?

Comment 5 David Kilzer (:ddkilzer) 2007-07-31 23:36:38 PDT
Implicitly confirmed by ap.  :)

Comment 6 Mark Rowe (bdash) 2007-08-01 05:42:05 PDT
<rdar://problem/5376650>
Comment 7 Alexey Proskuryakov 2007-08-01 06:31:01 PDT
Explicitly confirming with Safari beta 3.0.3 and r24749 (also under Parallels, but that shouldn't matter).
Comment 8 Jesse Costello-Good 2007-08-01 09:07:27 PDT
Yes, r24749 in both cases.
Comment 9 Brady Eidson 2007-09-24 17:32:36 PDT
The success case now works on both Mac and Windows.  I just tried both with ToT builds from today.

Using the code - 

<html>
<head>
<script>
    var r = new XMLHttpRequest();
    r.open("GET", "http://gi.tibco.com/tests/auth/data1.xml", false, "gi", "gi");
    r.send();
    alert(r.status);
</script>
</head>
</html>

Both Mac and Windows alert "200" 

However there still seems to be some form of bug, as if I change the un/pw to something incorrect, like "sdufghwueg", "wheuhw", Mac alerts "401", and Windows alerts nothing.  The Javascript console on Windows shows
"Error: NETWORK_ERR: XMLHttpRequest Exception 101"

So Windows now can successfully login using HTTP auth, but it's failed credential case is broken
Comment 10 Alexey Proskuryakov 2010-07-12 14:40:30 PDT
I cannot reproduce this with xmlhttprequest/failed-auth.html regression test now.

Note that requests from file:// are treated as cross-origin on Windows now, so the original test case doesn't work.