Bug 24886 - XHR requests opened when offline never return
Summary: XHR requests opened when offline never return
Status: RESOLVED DUPLICATE of bug 22475
Alias: None
Product: WebKit
Classification: Unclassified
Component: XML (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac (Intel) OS X 10.5
: P2 Normal
Assignee: David Levin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-27 08:44 PDT by James Watts
Modified: 2009-04-01 03:51 PDT (History)
3 users (show)

See Also:


Attachments
test case (796 bytes, text/html)
2009-03-27 08:48 PDT, James Watts
no flags Details
Same test with error handler. (926 bytes, text/html)
2009-03-27 09:43 PDT, David Levin
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description James Watts 2009-03-27 08:44:33 PDT
Opening and sending an XMLHttpRequest when offline will call back the ready state change handler with the loading state, but will never respond after this, even if the network connection is restored.  Other browsers will always timeout and fail, and in some cases (FF3 on the mac) will recover if the network is restored.  Workaround is to set a timeout and abort the request, but this shouldn't be necessary.

Repro'd on:
Chrome 2 (v530.1 Win XP SP3)
Safari 4 (v528.16 Mac OSx 10.5.6 Macintosh Intel)
Webkit Nightly (v530.4+ Mac OSx 10.5.6 Macintosh Intel)
Comment 1 James Watts 2009-03-27 08:48:32 PDT
Created attachment 29011 [details]
test case

To repro with this file:
-- edit the url to a valid URL
-- load this file and clear the cache
-- disable the network
-- click 'send xhr'
-- hang on loading
Comment 2 David Levin 2009-03-27 09:22:11 PDT
I'll look into it.
Comment 3 David Levin 2009-03-27 09:43:53 PDT
Created attachment 29013 [details]
Same test with error handler.
Comment 4 Alexey Proskuryakov 2009-03-28 09:53:53 PDT
This looks closely related to bug 22475.
Comment 5 Alexey Proskuryakov 2009-04-01 03:51:57 PDT
I have a patch that fixes both.

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