xhr should allow Http code 201 as successful
opened this issue · comments
Deleted user commented
diff --git a/iOS/www/js/lib/xui-2.2.0.js b/iOS/www/js/lib/xui-2.2.0.js
index 1a0e50d..aa9bddb 100644
--- a/iOS/www/js/lib/xui-2.2.0.js
+++ b/iOS/www/js/lib/xui-2.2.0.js
@@ -1358,8 +1358,11 @@ xui.extend({
function hdl(){
if(req.readyState==4) {
delete(that.xmlHttpRequest);
- if(req.status===0 || req.status==200) req.handleResp();
- if((/^[45]/).test(req.status)) req.handleError(req.status, req.statusText);
+ if(req.status===0 || (/^[2]/).test(req.status)) {
+ req.handleResp();
+ } else if((/^[45]/).test(req.status)) {
+ req.handleError(req.status, req.statusText);
+ }
}
}
if(async) {