Permalink
Browse files

Case headers are bad

  • Loading branch information...
1 parent dfdec2b commit c4fb3436d57cd99f56a1c54e5f64cd66883d2af7 @dscape dscape committed Aug 20, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 nano.js
View
2 nano.js
@@ -93,7 +93,7 @@ module.exports = exports = nano = function database_module(cfg) {
if(!callback) { return request(req); } // void callback
request(req, function(e,h,b){
if(e) { return callback(error.request_err(e,"socket",req,status_code),{},b); }
- rh = h.headers;
+ rh = (h.headers || {});
rh.status_code = status_code = h.statusCode;
try { parsed = JSON.parse(b); } catch (err) { parsed = b; } // did we get json or binary?
if (status_code >= 200 && status_code < 300) {

0 comments on commit c4fb343

Please sign in to comment.