Permalink
Browse files

HTTP-Errors start from 400, not from 300. Also, the 300's are nothing…

… to ignore, they're pretty essential (see meanings of 301, 302, 304). I changed this mainly because I couldn't test the new opts.headers feature without, but tests are running fine with this change and I don't *think* there might be issues with that.
  • Loading branch information...
streunerlein committed May 29, 2012
1 parent bfcfbb5 commit afac0e244dbc39d86f859ac4131c8c6deffef053
Showing with 1 addition and 1 deletion.
  1. +1 −1 nano.js
View
@@ -275,7 +275,7 @@ module.exports = exports = nano = function database_module(cfg) {
try { parsed = JSON.parse(b); } catch (err) { parsed = b; }
- if (status_code >= 200 && status_code < 300) {
+ if (status_code >= 200 && status_code < 400) {
log({err: null, body: parsed, headers: rh});
callback(null,parsed,rh);
return stream;

0 comments on commit afac0e2

Please sign in to comment.