From ae406fb269fc134b8c6482f30c2dd06a512fbbc4 Mon Sep 17 00:00:00 2001 From: buathi_q Date: Tue, 29 Jul 2014 17:01:20 +0200 Subject: [PATCH 1/2] Fix a weird comportment with headers --- lib/dbox.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/dbox.js b/lib/dbox.js index d39a258..5cddd7a 100644 --- a/lib/dbox.js +++ b/lib/dbox.js @@ -141,8 +141,7 @@ exports.app = function(config){ if (e) { cb(null, null, null); } else { - var headers = (r.headers['x-dropbox-metadata'] !== undefined) ? helpers.parseJSON(r.headers['x-dropbox-metadata']) : {}; - cb(r.statusCode, b, headers); + cb(r.statusCode, b, r.headers); } }) }, From 3acfd61cce4f5bbf80e963afee61f13e2f5e4a57 Mon Sep 17 00:00:00 2001 From: buathi_q Date: Tue, 29 Jul 2014 17:16:02 +0200 Subject: [PATCH 2/2] Update README --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 212cf89..5599976 100644 --- a/README.md +++ b/README.md @@ -242,15 +242,15 @@ output of `reply` returns... Pulls down file (available as a buffer) with its metadata. - client.get("foo/hello.txt", function(status, reply, metadata){ - console.log(reply.toString(), metadata) + client.get("foo/hello.txt", function(status, reply, headers){ + console.log(reply.toString(), headers['x-dropbox-metadata']); }) output of `reply.toString()` returns... here is some text -output of `metadata` returns... +output of `headers['x-dropbox-metadata']` returns... { "revision": 11,