Skip to content
Browse files

[nano] 1.1.1

* added uri to response headers to make life easier on applications requesting
  info but getting a database doesnt exist response
* fixed potential error with pull request #46 currently in review by @perezd
  • Loading branch information...
1 parent c5fb55d commit ba9371a414ce9bb6d488d188ff6fd6afda580f90 @dscape committed Jan 13, 2012
Showing with 3 additions and 2 deletions.
  1. +2 −1 nano.js
  2. +1 −1 package.json
View
3 nano.js
@@ -93,14 +93,14 @@ module.exports = exports = nano = function database_module(cfg) {
* @param {callback:function:optional} function to call back
*/
function relax(opts,callback) {
+ var log = logging();
try {
var headers = { "content-type": "application/json"
, "accept": "application/json"
}
, req = { method: (opts.method || "GET"), headers: headers
, uri: cfg.url + "/" + opts.db }
, params = opts.params
- , log = logging()
, status_code
, parsed
, rh;
@@ -147,6 +147,7 @@ module.exports = exports = nano = function database_module(cfg) {
request(req, function(e,h,b){
rh = (h && h.headers || {});
rh['status-code'] = status_code = (h && h.statusCode || 500);
+ rh.uri = req.uri;
if(e) {
log({err: 'socket', body: b, headers: rh });
return callback(error.request(e,"socket",req,status_code),b,rh);
View
2 package.json
@@ -2,7 +2,7 @@
, "description" : "minimalistic couchdb driver for node.js"
, "homepage" : "http://github.com/dscape/nano"
, "repository" : "git://github.com/dscape/nano"
-, "version" : "1.1.0"
+, "version" : "1.1.1"
, "author" : "Nuno Job <nunojobpinto@gmail.com> (http://nunojob.com)"
, "contributors" :
[ "Thiago Arrais <thiago.arrais@gmail.com> (http://thiagoarrais.com)"

0 comments on commit ba9371a

Please sign in to comment.
Something went wrong with that request. Please try again.