trooba-xhr-transport
Advanced tools
Comparing version 2.0.1 to 2.0.2
# ChangeLog | ||
## v2.0.2 | ||
Fixed: the handler fails to handle 2XX responses | ||
## v2.0.1 | ||
@@ -4,0 +7,0 @@ Fixed: Should allow different origin when allow origin is * |
@@ -79,2 +79,10 @@ /*jslint browser: true*/ | ||
} | ||
// 3XX responses are treated as error by jsonpipe | ||
if (xhr && (xhr.status > 200 && xhr.status < 300)) { | ||
resHeaders = resHeaders || (xhr.getAllResponseHeaders() || ''); | ||
callback(null, { | ||
statusCode: xhr.status, | ||
headers: resHeaders | ||
}); | ||
} | ||
// only do second callback when it is chunked | ||
@@ -81,0 +89,0 @@ if (_isChunked) { |
{ | ||
"name": "trooba-xhr-transport", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "AJAX/XHR transport for trooba pipeline", | ||
@@ -11,3 +11,3 @@ "main": "index.js", | ||
"test": "./node_modules/mocha/bin/mocha test", | ||
"test-coverage": "./node_modules/.bin/istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec" | ||
"test-coverage": "./node_modules/.bin/istanbul cover ./node_modules/mocha/bin/_mocha -- -R spec" | ||
}, | ||
@@ -14,0 +14,0 @@ "repository": { |
Sorry, the diff of this file is not supported yet
21302
171