Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ae48c2c71c | |||
| 570f85ec18 | |||
| 85381f0e3d | |||
| 3bea2a493f |
+6
-4
@@ -120,7 +120,7 @@ ClientRequest.prototype._onFinish = function () {
|
||||
}).then(function (response) {
|
||||
self._fetchResponse = response
|
||||
self._connect()
|
||||
}).then(undefined, function (reason) {
|
||||
}, function (reason) {
|
||||
self.emit('error', reason)
|
||||
})
|
||||
} else {
|
||||
@@ -183,12 +183,14 @@ ClientRequest.prototype._onFinish = function () {
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if xhr.status is readable. Even though the spec says it should
|
||||
* be available in readyState 3, accessing it throws an exception in IE8
|
||||
* Checks if xhr.status is readable and non-zero, indicating no error.
|
||||
* Even though the spec says it should be available in readyState 3,
|
||||
* accessing it throws an exception in IE8
|
||||
*/
|
||||
function statusValid (xhr) {
|
||||
try {
|
||||
return (xhr.status !== null)
|
||||
var status = xhr.status
|
||||
return (status !== null && status !== 0)
|
||||
} catch (e) {
|
||||
return false
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "stream-http",
|
||||
"version": "2.0.1",
|
||||
"version": "2.0.3",
|
||||
"description": "Streaming http in the browser",
|
||||
"main": "index.js",
|
||||
"repository": {
|
||||
|
||||
Reference in New Issue
Block a user