diff options
Diffstat (limited to 'src/ng/httpBackend.js')
| -rw-r--r-- | src/ng/httpBackend.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ng/httpBackend.js b/src/ng/httpBackend.js index 565e1b12..d2806e3e 100644 --- a/src/ng/httpBackend.js +++ b/src/ng/httpBackend.js @@ -121,14 +121,14 @@ function createHttpBackend($browser, createXhr, $browserDefer, callbacks, rawDoc } function completeRequest(callback, status, response, headersString) { - var protocol = urlResolve(url).protocol; - // cancel timeout and subsequent timeout promise resolution timeoutId && $browserDefer.cancel(timeoutId); jsonpDone = xhr = null; - // fix status code for file protocol (it's always 0) - status = (protocol == 'file' && status === 0) ? (response ? 200 : 404) : status; + // 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; |
