XMLHttpRequest.open() on bad URL within extension gives poor error message

UNCONFIRMED
Unassigned

Status

()

Core
Networking
P5
normal
UNCONFIRMED
10 years ago
a month ago

People

(Reporter: Michael Toomim, Unassigned)

Tracking

Trunk
PowerPC
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [necko-would-take])

(Reporter)

Description

10 years ago
User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-us) AppleWebKit/523.10.5 (KHTML, like Gecko) Version/3.0.4 Safari/523.10.6
Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9b2) Gecko/2007121014 Firefox/3.0b2

If I do a GET or POST xmlhttprequest with a bad url, such as "/" instead of an absolute url, firefox either gives fails with NO error message (beta3) or gives the following error in the error console:

Error: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIXMLHttpRequest.open]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: chrome://sample/content/overlay.js :: test_req :: line 322"  data: no]
Source File: chrome://sample/content/overlay.js
Line: 322


Reproducible: Always

Steps to Reproduce:
var request_ap = new XMLHttpRequest();
request_ap.open('POST', '/', true);
Actual Results:  
Either no error message or 0x80004005 (NS_ERROR_FAILURE) depending on build

Expected Results:  
An error saying "bad url"
(Reporter)

Comment 1

10 years ago
This is only for code running within extensions, not for javascript in a web page.

Updated

10 years ago
Component: Extension/Theme Manager → Networking
Product: Firefox → Core
QA Contact: extension.manager → networking
Version: unspecified → Trunk
Whiteboard: [necko-would-take]
Bulk change to priority: https://bugzilla.mozilla.org/show_bug.cgi?id=1399258
Priority: -- → P5
You need to log in before you can comment on or make changes to this bug.