Skip to content
This repository has been archived by the owner on Nov 5, 2018. It is now read-only.

Commit

Permalink
Case headers are bad
Browse files Browse the repository at this point in the history
  • Loading branch information
dscape committed Aug 20, 2011
1 parent dfdec2b commit c4fb343
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nano.js
Expand Up @@ -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) {
Expand Down

0 comments on commit c4fb343

Please sign in to comment.