(callback, status, response, headersString, statusText)
| 8646 | } |
| 8647 | |
| 8648 | function completeRequest(callback, status, response, headersString, statusText) { |
| 8649 | // cancel timeout and subsequent timeout promise resolution |
| 8650 | timeoutId && $browserDefer.cancel(timeoutId); |
| 8651 | jsonpDone = xhr = null; |
| 8652 | |
| 8653 | // fix status code when it is 0 (0 status is undocumented). |
| 8654 | // Occurs when accessing file resources or on Android 4.1 stock browser |
| 8655 | // while retrieving files from application cache. |
| 8656 | if (status === 0) { |
| 8657 | status = response ? 200 : urlResolve(url).protocol == 'file' ? 404 : 0; |
| 8658 | } |
| 8659 | |
| 8660 | // normalize IE bug (http://bugs.jquery.com/ticket/1450) |
| 8661 | status = status === 1223 ? 204 : status; |
| 8662 | statusText = statusText || ''; |
| 8663 | |
| 8664 | callback(status, response, headersString, statusText); |
| 8665 | $browser.$$completeOutstandingRequest(noop); |
| 8666 | } |
| 8667 | }; |
| 8668 | |
| 8669 | function jsonpReq(url, callbackId, done) { |
no test coverage detected