(callback, status, response, headersString, statusText)
| 8675 | } |
| 8676 | |
| 8677 | function completeRequest(callback, status, response, headersString, statusText) { |
| 8678 | // cancel timeout and subsequent timeout promise resolution |
| 8679 | timeoutId && $browserDefer.cancel(timeoutId); |
| 8680 | jsonpDone = xhr = null; |
| 8681 | |
| 8682 | // fix status code when it is 0 (0 status is undocumented). |
| 8683 | // Occurs when accessing file resources or on Android 4.1 stock browser |
| 8684 | // while retrieving files from application cache. |
| 8685 | if (status === 0) { |
| 8686 | status = response ? 200 : urlResolve(url).protocol == 'file' ? 404 : 0; |
| 8687 | } |
| 8688 | |
| 8689 | // normalize IE bug (http://bugs.jquery.com/ticket/1450) |
| 8690 | status = status === 1223 ? 204 : status; |
| 8691 | statusText = statusText || ''; |
| 8692 | |
| 8693 | callback(status, response, headersString, statusText); |
| 8694 | $browser.$$completeOutstandingRequest(noop); |
| 8695 | } |
| 8696 | }; |
| 8697 | |
| 8698 | function jsonpReq(url, callbackId, done) { |
no test coverage detected