Skip to main content

Bug Tracker

Side navigation

#8135 closed bug (fixed)

Opened February 02, 2011 01:34AM UTC

Closed February 02, 2011 12:34PM UTC

Last modified March 09, 2012 09:53AM UTC

ajax connection error not correctly handled in Firefox

Reported by: john.firebaugh Owned by: jaubourg
Priority: high Milestone: 1.5.1
Component: ajax Version: 1.5
Keywords: Cc:
Blocked by: Blocking:

Configure a server to serve the following static page, and visit it in Firefox:

Stop the server, then click the button.

Expected result: error alert.

Actual result: no alert is shown, and the following error is printed in the Firebug console:

uncaught exception: [Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIXMLHttpRequest.getAllResponseHeaders]" nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame :: :: anonymous :: line 7207" data: no]

Attachments (0)
Change History (7)

Changed February 02, 2011 01:35AM UTC by john.firebaugh comment:1

Firefox version 3.6.13.

Changed February 02, 2011 03:36AM UTC by jitter comment:2

cc: → jaubourg
component: unfiledajax
priority: undecidedhigh
status: newopen <-- description

FF bug ticket <-- unfixed since 2004(!!)

Changed February 02, 2011 10:30AM UTC by jaubourg comment:3

owner: → jaubourg
status: openassigned

Changed February 02, 2011 12:34PM UTC by jaubourg comment:4

resolution: → fixed
status: assignedclosed

Fixes #8135. Makes sure any exception thrown by Firefox when trying to access an XMLHttpRequest property when a network error occured is caught and notified as an error. Added test/networkerror.html to test the behavior.

Changeset: b90369e8cb2b6f3cc0afa34d815958ff0b605874

Changed February 07, 2011 04:25PM UTC by comment:5

do you think it would make sense to make it a general try/catch block rather than specific to FireFox? Like the try/catch for Firefox above around setting the xhr.setRequestHeader?

But *THIS* patch is fantastic! Thank you *very* much for doing it.

Changed February 28, 2011 10:58AM UTC by jitter comment:6

cc: jaubourg
milestone: 1.next1.5.1

Changed February 28, 2011 10:58AM UTC by jitter comment:7

#8400 is a duplicate of this ticket.