You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
[BUG] Getting HTTP response 404 for net::ERR_CONNECTION_REFUSED #6503
Hi, I'm developing offline capabilities for one webapp and I realised here that you change HTTP status from 0 to 404.
I would like to detect the 0 status code and stop the sync process, but now it's no reliable at all.
We can assume that all 0 responses are related when there's no connection to server? I thought it was like this, I'm missing something?
The related code:
functioncompleteRequest(callback,status,response,headersString){// cancel timeout and subsequent timeout promise resolutiontimeoutId&&$browserDefer.cancel(timeoutId);jsonpDone=xhr=null;// fix status code when it is 0 (0 status is undocumented).// Occurs when accessing file resources.// On Android 4.1 stock browser it occurs while retrieving files from application cache.status=(status===0) ? (response ? 200 : 404) : status;// normalize IE bug (http://bugs.jquery.com/ticket/1450)status=status==1223 ? 204 : status;callback(status,response,headersString);$browser.$$completeOutstandingRequest(noop);}};
Activity
pkozlowski-opensource commentedon Mar 1, 2014
Yes, this is duplicate of #6074 and #6155. I've got a fix ready locally, will be sending a pull request today.
pkozlowski-opensource commentedon Mar 1, 2014
Closing this one as a duplicate.
marcalj commentedon Mar 1, 2014
@pkozlowski-opensource Great!! Thanks! :)