This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 28577 - [XMLHttpRequest] Throwing SecurityError on open() call for some kind of simple errors
Summary: [XMLHttpRequest] Throwing SecurityError on open() call for some kind of simpl...
Status: RESOLVED WORKSFORME
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: XHR (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: Anne
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-28 04:55 UTC by Takeshi Yoshino
Modified: 2015-06-11 14:58 UTC (History)
3 users (show)

See Also:


Attachments

Description Takeshi Yoshino 2015-04-28 04:55:54 UTC
Seems the WebAppSec WG attempted to make xhr.open() throw NetworkError for some errors that could be detected synchronously such as mixed content. What's the status of that?
Comment 1 Takeshi Yoshino 2015-04-28 05:11:13 UTC
Sorry. I meant SecurityError.

It has been removed on this change.
https://github.com/w3c/webappsec/commit/aac819b28287e8fd3a9ebad2666336e2bc77a24b

So, the consensus is:
- to handle it as network error
- in async mode, not throwing but dispatching an error event async

Right?
Comment 2 Takeshi Yoshino 2015-04-28 05:14:45 UTC
OK. Anne objected to the plan at https://lists.w3.org/Archives/Public/public-webappsec/2014Oct/thread.html#msg198
Comment 3 Takeshi Yoshino 2015-04-28 05:19:22 UTC
Maybe the same argument applies to the proposal of making send() throw.

Just wanna confirm what Anne think of that.
Comment 4 Anne 2015-04-29 15:08:19 UTC
Yes, send() should only throw for synchronous XMLHttpRequest. Not otherwise. Now that Mixed Content is defined in terms of fetching this should all fall out naturally, no?

To recap, the status is that WebAppSec dropped their attempt and instead integrate with Fetch.
Comment 5 Anne 2015-05-05 17:09:08 UTC
Takeshi, can this be closed?
Comment 6 Takeshi Yoshino 2015-06-11 14:03:17 UTC
OK. Please close. I'll reopen when necessary. Thanks!